3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { function bar() { echo 'Hello!'; } bar(); bar(); bar(); } foo(); foo();
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Hello!Hello!Hello! Fatal error: Cannot redeclare bar() (previously declared in /in/FMEFB:6) in /in/FMEFB on line 5
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Hello!Hello!Hello!Hello!Hello!Hello!
Output for 4.3.0 - 4.3.1
Hello!Hello!Hello! Fatal error: Cannot redeclare bar() (previously declared in /in/FMEFB:6) in /in/FMEFB on line 5