3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php f(); if (true) { function f() { echo 1; } } else { function f() { echo 2; } } function f() { echo 3; }
based on N3G3L
Output for 4.3.2 - 7.2.0
3 Fatal error: Cannot redeclare f() (previously declared in /in/s2OZL:4) in /in/s2OZL on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
3 Fatal error: Cannot redeclare f() (previously declared in /in/s2OZL:4) in /in/s2OZL on line 3