--TEST-- GH-15168 (stack overflow in json_encode()) --SKIPIF-- --INI-- zend.max_allowed_stack_size=512K --FILE-- next = $newNode; $node = $newNode; } var_dump(json_encode($firstNode, depth: 500000)); var_dump(json_last_error()); var_dump(json_last_error_msg()); ?> --EXPECT-- bool(false) int(1) string(28) "Maximum stack depth exceeded"