TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
381 B
26 lines
381 B
--TEST--
|
|
SSA object prop: hoist array property through indirect Var handle
|
|
--FILE--
|
|
<?php
|
|
use native_types;
|
|
|
|
class Foo {
|
|
public array $items = [];
|
|
}
|
|
|
|
function main(): void {
|
|
$foo = new Foo();
|
|
$foo->items[] = 'a';
|
|
$foo->items[] = 'b';
|
|
$foo->items[1] = 'c';
|
|
|
|
var_dump($foo->items);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[0]=>
|
|
string(1) "a"
|
|
[1]=>
|
|
string(1) "c"
|
|
}
|
|
|