3v4l.org

run code in 300+ PHP versions simultaneously
<?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();
Output for git.master, git.master_jit, rfc.property-hooks
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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.67 ms | 401 KiB | 8 Q