3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A {} class A {}
Output for 7.0.0 - 7.3.0rc4
Fatal error: Cannot declare class A, because the name is already in use in /in/3vOPG on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Class already declared: A in /in/3vOPG:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.12.14 - 3.21.3
Fatal error: Uncaught Error: Class already declared: A in /in/3vOPG:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.5.0 - 5.6.38
Fatal error: Cannot redeclare class A in /in/3vOPG on line 5
Process exited with code 255.