- 添加 class-const-003.phpt 测试文件验证类常量功能 - 修复数组类型类常量的值复制逻辑 - 移除未使用的 Zend 引擎常量表更新代码 - 统一代码风格将冒号语法替换为大括号语法 - 简化类常量更新方法的控制流程pull/1/head
parent
ad3bd659b0
commit
28f2b5ac8a
2 changed files with 37 additions and 13 deletions
@ -0,0 +1,31 @@ |
||||
--TEST-- |
||||
class const 002 |
||||
--FILE-- |
||||
<?php |
||||
class Worker |
||||
{ |
||||
public const int V1 = 1999; |
||||
public const int V2 = self::V1; |
||||
|
||||
public const array ARR = [ |
||||
'a' => self::V1, |
||||
'b' => self::V2, |
||||
]; |
||||
} |
||||
|
||||
function main() |
||||
{ |
||||
var_dump(Worker::V1); |
||||
var_dump(Worker::V2); |
||||
var_dump(Worker::ARR); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
int(1999) |
||||
int(1999) |
||||
array(2) { |
||||
["a"]=> |
||||
int(1999) |
||||
["b"]=> |
||||
int(1999) |
||||
} |
||||
Loading…
Reference in new issue