3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo() {} function Foo() {}
Output for 5.3.0 - 5.6.30, 7.0.0 - 7.2.4
Fatal error: Cannot redeclare Foo() (previously declared in /in/bpkds:3) in /in/bpkds on line 5
Process exited with code 255.
Output for hhvm-3.11.1 - 3.22.0
Fatal error: Uncaught Error: Function already defined: Foo in : Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: Function already defined: Foo
Process exited with code 255.
Output for 4.3.2 - 5.2.17
Fatal error: Cannot redeclare foo() (previously declared in /in/bpkds:3) in /in/bpkds on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot redeclare foo() (previously declared in /in/bpkds:3) in /in/bpkds on line 5