3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function A () { echo "I'm A"; } } class B extends A { function __construct() { parent::__constrUct(); } } $b = new B;
Output for 7.0.0 - 7.2.6
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/rvtdc on line 3 I'm A
Output for 4.3.0 - 4.4.9, 5.2.2 - 5.6.28
I'm A
Output for 5.0.0 - 5.2.1
Fatal error: Call to undefined method A::__construct() in /in/rvtdc on line 9
Process exited with code 255.