Home
Sign Up
Sign In
V2EX
›
PHP
PHP 的静态属性可以用另外一个静态属性加一个字符串吗?
displayabc
·
Jul 11, 2014
· 3171 views
This topic created in 4411 days ago, the information mentioned may be changed or developed.
如:
class a{
public static $name = 'hhhhhh';
public static $full_name = self::$name . 'xxxxxxxx';
}
不写方法的情况下,怎么能实现这种效果?
字符串
Static
静态
1 replies
•
2014-07-11 14:54:23 +08:00
1
wesley
Jul 11, 2014
不可以, 定义属性的时候不能用变量、函数
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
1065 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms ·
UTC 23:47
·
PVG 07:47
·
LAX 16:47
·
JFK 19:47
♥ Do have faith in what you're doing.
❯