3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A {} $a = new A; $a->self = $a; var_export($a);
based on Imvi2
Output for 5.4.7 - 7.1.0
Warning: var_export does not handle circular references in /in/vek0C on line 8 A::__set_state(array( 'self' => NULL, ))
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.4.6
Fatal error: Nesting level too deep - recursive dependency? in /in/vek0C on line 8
Process exited with code 255.
Output for 5.1.0 - 5.2.13, 5.3.0 - 5.3.2
A::__set_state(array( 'self' => A::__set_state(array( 'self' => A::__set_state(array( 'self' => A::__set_state(array( Fatal error: Nesting level too deep - recursive dependency? in /in/vek0C on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
class A { public $self = class A { public $self = class A { public $self = class A { Fatal error: Nesting level too deep - recursive dependency? in /in/vek0C on line 8
Process exited with code 255.
Output for 4.3.0 - 4.4.9
class a { var $self = class a { }; }