3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { var $value; var $young_myself; function __construct($var) { test($var); } function test($var) { $this->value=$var; if($self > 10) $this->young_myself=new self($var-10); else $this->young_myself = FALSE; } function getAge(){ if(!!$this->young_myself) return $this->value; else return "Not birth yet"; } } $new = new test(51); echo $new->young_myself->young_myself->young_myself->young_myself->young_myself->getAge();
based on 4UgIY
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function test() in /in/hAetn:9 Stack trace: #0 /in/hAetn(25): test->__construct(51) #1 {main} thrown in /in/hAetn on line 9
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function test() in /in/hAetn on line 9
Process exited with code 255.