3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** * vendor implementation of FooInterface */ interface Vendor_FooInterface // autogenerated, formerly known as FooInterface { const MY_CONST = 'core'; } /** * venture implementation of FooInterface */ interface FooInterface extends Vendor_FooInterface { const MY_CONST = 'venture'; } var_dump(FooInterface::MY_CONST);
Output for 5.2.12 - 5.2.17, 7.0.0 - 7.1.0
Fatal error: Cannot inherit previously-inherited or override constant MY_CONST from interface Vendor_FooInterface in /in/V6qmW on line 13
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Cannot override previously defined constant Vendor_FooInterface::MY_CONST in FooInterface in /in/V6qmW on line 13
Process exited with code 255.
Output for 5.3.2 - 5.6.28
Fatal error: Cannot inherit previously-inherited or override constant MY_CONST from interface Vendor_FooInterface in /in/V6qmW on line 14
Process exited with code 255.