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
508 B
35 lines
508 B
--TEST--
|
|
Bug #22224 (implode changes object references in array)
|
|
--SKIPIF--
|
|
<?php
|
|
echo 'skip AOT compiler requires __toString() to have explicit :string return type';
|
|
?>
|
|
--INI--
|
|
error_reporting=0
|
|
--FILE--
|
|
<?php
|
|
class foo
|
|
{
|
|
function __toString()
|
|
{
|
|
return "Object";
|
|
}
|
|
}
|
|
|
|
|
|
$a = new foo();
|
|
|
|
$arr = array(0=>&$a, 1=>&$a);
|
|
var_dump(implode(",",$arr));
|
|
var_dump($arr)
|
|
?>
|
|
--EXPECTF--
|
|
string(13) "Object,Object"
|
|
array(2) {
|
|
[0]=>
|
|
&object(foo)#%d (0) {
|
|
}
|
|
[1]=>
|
|
&object(foo)#%d (0) {
|
|
}
|
|
}
|
|
|