xref: /PHP-8.4/Zend/tests/bug63882.phpt (revision 82479e89)
1--TEST--
2Bug #63882 (zend_std_compare_objects crash on recursion)
3--FILE--
4<?php
5class Test { public $x = 5; }
6
7$testobj1 = new Test;
8$testobj2 = new Test;
9$testobj1->x = $testobj1;
10$testobj2->x = $testobj2;
11
12try {
13    var_dump($testobj1 == $testobj2);
14} catch (Error $e) {
15    echo $e->getMessage(), "\n";
16}
17
18?>
19--EXPECT--
20Nesting level too deep - recursive dependency?
21