- 新增 class-static-005.phpt 测试文件 - 测试 final public const 在静态方法中的访问 - 验证 static:: 访问修饰符的行为 - 确保版本常量能被正确输出pull/1/head
parent
746dc23680
commit
cc1b476a31
1 changed files with 21 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||||||
|
--TEST-- |
||||||
|
class static 005 |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
class Worker |
||||||
|
{ |
||||||
|
final public const VERSION = '5.1.9'; |
||||||
|
|
||||||
|
static function init() |
||||||
|
{ |
||||||
|
var_dump(static::VERSION); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function main() |
||||||
|
{ |
||||||
|
Worker::init(); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
string(5) "5.1.9" |
||||||
Loading…
Reference in new issue