3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Node { public $next; public $previous; } $first = new Node(); $first->next = $first; $new = new Node(); $new->previous = $first; $new->next = $first; $first->previous = $new; var_dump($first == $new);
Output for 8.4.1 - 8.4.27, 8.5.0 - 8.5.11
Fatal error: Uncaught Error: Nesting level too deep - recursive dependency? in /in/SttGY:16 Stack trace: #0 {main} thrown in /in/SttGY on line 16
Process exited with code 255.
Output for 8.1.34, 8.2.0 - 8.2.35, 8.3.0 - 8.3.35
Fatal error: Nesting level too deep - recursive dependency? in /in/SttGY on line 16

preferences:
41.57 ms | 1511 KiB | 10 Q