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.
 
 

28 lines
391 B

--TEST--
unset typed property via dynamic code
--FILE--
<?php
class FooObject {
public int $value = 42;
}
function main() {
$base = new FooObject();
$base->value += 1;
var_dump($base->value);
eval('function test(FooObject $obj) {
unset($obj->value);
}');
test($base);
var_dump($base->value);
echo "done\n";
}
?>
--EXPECT--
int(43)
int(0)
done