diff --git a/ext/json/tests/gh15168.phpt b/ext/json/tests/gh15168.phpt index 9b674d6b4ac07..66000e5b90e68 100644 --- a/ext/json/tests/gh15168.phpt +++ b/ext/json/tests/gh15168.phpt @@ -31,6 +31,10 @@ var_dump(json_encode($firstNode, depth: 500000)); var_dump(json_last_error()); var_dump(json_last_error_msg()); +while ($next = $firstNode->next) { + $firstNode->next = $next->next; +} + ?> --EXPECT-- bool(false) diff --git a/ext/standard/tests/serialize/gh15169.phpt b/ext/standard/tests/serialize/gh15169.phpt index 9249a593fbb20..19c1415b05c8e 100644 --- a/ext/standard/tests/serialize/gh15169.phpt +++ b/ext/standard/tests/serialize/gh15169.phpt @@ -30,6 +30,11 @@ try { } catch (Error $e) { echo $e->getMessage(), "\n"; } + +while ($next = $firstNode->next) { + $firstNode->next = $next->next; +} + ?> --EXPECTF-- Maximum call stack size of %d bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?