xref: /PHP-7.4/Zend/tests/bug78379_2.phpt (revision 6b1cc125)
1--TEST--
2Bug #78379.2 (Cast to object confuses GC, causes crash)
3--FILE--
4<?php
5class E {}
6function f() {
7	$e1 = new E;
8	$e2 = new E;
9	$a = ['e2' => $e2];
10	$e1->a = (object)$a;
11	$e2->e1 = $e1;
12	$e2->a = (object)$a;
13}
14f();
15gc_collect_cycles();
16echo "End\n";
17?>
18--EXPECT--
19End
20