3v4l.org

run code in 200+ php & hhvm versions
<?php function foo() { function bar() { echo "bar"; } bar(); } foo(); foo();
Output for 4.3.2 - 5.6.40, 7.0.0 - 7.4.0beta2
bar Fatal error: Cannot redeclare bar() (previously declared in /in/anQls:5) in /in/anQls on line 4
Process exited with code 255.
Output for hhvm-3.10.1 - 3.22.0
barbar
Output for 4.3.0 - 4.3.1
bar Fatal error: Cannot redeclare bar() (previously declared in /in/anQls:5) in /in/anQls on line 4