3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (true) { function f() { echo 1; } } else { function f() { echo 2; } } f();
based on t5oVv
Output for 5.0.0 - 7.2.0
1
Output for 4.3.0 - 4.4.9
2