mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
20 lines
275 B
PHP
20 lines
275 B
PHP
--TEST--
|
|
Bug #78379.2 (Cast to object confuses GC, causes crash)
|
|
--FILE--
|
|
<?php
|
|
class E {}
|
|
function f() {
|
|
$e1 = new E;
|
|
$e2 = new E;
|
|
$a = ['e2' => $e2];
|
|
$e1->a = (object)$a;
|
|
$e2->e1 = $e1;
|
|
$e2->a = (object)$a;
|
|
}
|
|
f();
|
|
gc_collect_cycles();
|
|
echo "End\n";
|
|
?>
|
|
--EXPECT--
|
|
End
|