对象的初始值数组。对象的初始值数组
class test{
private $H_headers = array("A","B K ".chr(128),"C","D");
//Why I can not init this value?
...
}
}
Multiple annotations found at this line:
- syntax error, unexpected ','
- syntax error, unexpected '.',
expecting ')'
,但通常我可以:
$H_headers = array("A","B K ".chr(128),"C","D");
可能重复[?为什么不PHP属性允许功能(http://stackoverflow.com/questions/3960323/why -dont-php-attributes-allow-functions) – 2011-04-05 14:12:18
是的,我明白了,但不容易理解他们回答的是什么?但对我来说简单得多,看看这个我仍然无法解决我的问题。 – kn3l 2011-04-05 14:16:35
简而言之:你不能在那里使用功能。只是不使用功能那里。 – KingCrunch 2011-04-05 14:24:27