3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { function afunction() { static $test=10; $test--; echo $test; if($test>0) { afunction(); } } } $testa = new a(); echo $testa->afunction();
Output for 7.0.0 - 7.1.0
9 Fatal error: Uncaught Error: Call to undefined function afunction() in /in/PfrfR:14 Stack trace: #0 /in/PfrfR(20): a->afunction() #1 {main} thrown in /in/PfrfR on line 14
Process exited with code 255.
Output for 5.2.3 - 5.6.28, hhvm-3.10.0 - 3.12.0
9 Fatal error: Call to undefined function afunction() in /in/PfrfR on line 14
Process exited with code 255.
Output for 5.0.0 - 5.2.2
9<br /> <b>Fatal error</b>: Call to undefined function afunction() in <b>/in/PfrfR</b> on line <b>14</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
9<br /> <b>Fatal error</b>: Call to undefined function: afunction() in <b>/in/PfrfR</b> on line <b>14</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
9<br /> <b>Fatal error</b>: Call to undefined function: afunction() in <b>/in/PfrfR</b> on line <b>14</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
9<br /> <b>Fatal error</b>: Call to undefined function: afunction() in <b>/in/PfrfR</b> on line <b>14</b><br />