3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function __construct() { echo $this->get_class_name(); } } class B extends A {} new B();
based on 9s1nq
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method B::get_class_name() in /in/SvDkO:5 Stack trace: #0 /in/SvDkO(11): A->__construct() #1 {main} thrown in /in/SvDkO on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined method B::get_class_name() in /in/SvDkO on line 5
Process exited with code 255.