3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface I { const C = 'I'; } class A implements I { const C = 'A'; }
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Fatal error: Cannot inherit previously-inherited or override constant C from interface I in /in/DFB37 on line 7
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Cannot override previously defined constant I::C in A in /in/DFB37:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Cannot override previously defined constant I::C in A in /in/DFB37:7 Stack trace: #0 {main}
Process exited with code 255.