3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ConcreteBar { function test() { return "concrete"; } } class ApplicationBar { function test() { return "application"; } } // Alias Bar class_alias('ApplicationBar', 'Bar'); class Foo extends Bar { } $foo = new Foo; var_dump($foo->test());
based on 01U4t
Output for 5.3.0 - 7.2.0
string(11) "application"
Output for 5.0.0 - 5.2.17
Fatal error: Call to undefined function class_alias() in /in/UKABo on line 22
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: class_alias() in /in/UKABo on line 22
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: class_alias() in /in/UKABo on line 22
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: class_alias() in /in/UKABo on line 22