- 在编译器基础类中添加了 Expr_PropertyFetch 表达式处理逻辑 - 实现了原生属性变量检测和类型推断功能 - 新增了属性获取表达式的原生属性变量标记机制 - 更新了多个示例文件以使用 native_types 命名空间 - 添加了默认数组属性测试用例验证功能 - 集成了 polyfills 支持并在主入口点传递命令行参数pull/1/head
parent
089ae56f0b
commit
2912b40b0f
6 changed files with 42 additions and 1 deletions
@ -1,4 +1,4 @@ |
|||||||
#!/usr/bin/env php |
#!/usr/bin/env php |
||||||
<?php |
<?php |
||||||
include $argv[1]; |
include $argv[1]; |
||||||
main(); |
main($argc, $argv); |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
--TEST-- |
||||||
|
default array property |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
use native_types; |
||||||
|
|
||||||
|
class Test { |
||||||
|
protected int $x = 100; |
||||||
|
|
||||||
|
function bar() { |
||||||
|
$x = $this->x; |
||||||
|
$x += 23; |
||||||
|
$this->x += 12; |
||||||
|
var_dump($x, $this->x); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function main() { |
||||||
|
$obj = new Test; |
||||||
|
$obj->bar(); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
int(123) |
||||||
|
int(112) |
||||||
Loading…
Reference in new issue