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.
35 lines
622 B
35 lines
622 B
--TEST--
|
|
Bug #76713 (Segmentation fault caused by property corruption)
|
|
--FILE--
|
|
<?php
|
|
function test($obj)
|
|
{
|
|
return array_column(array($obj), "prop");
|
|
}
|
|
class C
|
|
{
|
|
public $name;
|
|
public function __get($name)
|
|
{
|
|
return $this->name;
|
|
}
|
|
}
|
|
function main()
|
|
{
|
|
$obj = new Stdclass();
|
|
$obj->prop = str_pad("a", 10, 'a');
|
|
test($obj);
|
|
test($obj);
|
|
test($obj);
|
|
var_dump($obj->prop);
|
|
$obj2 = new C();
|
|
$obj2->name = str_pad("b", 10, 'b');
|
|
test($obj2);
|
|
test($obj2);
|
|
test($obj2);
|
|
var_dump($obj2->prop);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(10) "aaaaaaaaaa"
|
|
string(10) "bbbbbbbbbb"
|
|
|