3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function __construct() { $this->hello("John"); } public function hello($name) { echo "Hello, $name", PHP_EOL; } } class B extends A { public function hello($name) { call_user_func_array(array(parent, "hello"), array("Smith")); } } new B();
Output for 7.2.0
Warning: Use of undefined constant parent - assumed 'parent' (this will throw an Error in a future version of PHP) in /in/IZV00 on line 11 Hello, Smith
Output for 5.3.18 - 7.1.10
Notice: Use of undefined constant parent - assumed 'parent' in /in/IZV00 on line 11 Hello, Smith