3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function bar() { echo 'here'; } } class Bel { public function bar() { echo 'there'; } } class_alias('Foo', 'Baz'); $b = new Baz; $b->bar(); class_alias('Bel', 'Baz'); $c = new Bel; $c->bar();
Output for 7.0.0 - 7.2.0
here Warning: Cannot declare class Baz, because the name is already in use in /in/iD7YG on line 18 there
Output for 5.3.18 - 5.6.28
here Warning: Cannot redeclare class Baz in /in/iD7YG on line 18 there