3v4l.org

run code in 200+ php & hhvm versions
<?php foo(); if (true) { function foo() {} }
based on Xi4qg
Output for 7.0.28 - 7.2.9
Fatal error: Uncaught Error: Call to undefined function foo() in /in/YSpRN:3 Stack trace: #0 {main} thrown in /in/YSpRN on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Call to undefined function foo() in /in/YSpRN:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Call to undefined function foo() in /in/YSpRN:3 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Call to undefined function foo() in /in/YSpRN on line 3
Process exited with code 255.