3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A {} $obj = new A; class_alias($obj, 'B'); $b = new B;
Output for 7.0.0 - 7.2.0
Warning: class_alias() expects parameter 1 to be string, object given in /in/6b0X9 on line 6 Fatal error: Uncaught Error: Class 'B' not found in /in/6b0X9:8 Stack trace: #0 {main} thrown in /in/6b0X9 on line 8
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Warning: class_alias() expects parameter 1 to be string, object given in /in/6b0X9 on line 6 Fatal error: Class 'B' not found in /in/6b0X9 on line 8
Process exited with code 255.