3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface I { function f($code = 1); static function sf(); const MY_CONST = 2; } class ATT { function att() {} } class BTT extends ATT implements I { const MY_CONST = 1; function f($code = 1) { // TODO: Implement f() method. } static function sf() { // TODO: Implement sf() method. } }
Output for 7.0.0 - 7.2.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ATT has a deprecated constructor in /in/6FllD on line 12 Fatal error: Cannot inherit previously-inherited or override constant MY_CONST from interface I in /in/6FllD on line 18
Process exited with code 255.
Output for 5.3.17 - 5.6.28
Fatal error: Cannot inherit previously-inherited or override constant MY_CONST from interface I in /in/6FllD on line 19
Process exited with code 255.