3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a= new stdClass(array('class_name' => 'stdClass')); $b = new $a->class_name(); var_dump($b);
Output for 7.0.0 - 7.1.0
Notice: Undefined property: stdClass::$class_name in /in/sS3BI on line 3 Fatal error: Uncaught Error: Class name must be a valid object or a string in /in/sS3BI:3 Stack trace: #0 {main} thrown in /in/sS3BI on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined property: stdClass::$class_name in /in/sS3BI on line 3 Fatal error: Cls: Expected string or object in /in/sS3BI on line 3
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.6 - 5.6.21
Notice: Undefined property: stdClass::$class_name in /in/sS3BI on line 3 Fatal error: Class name must be a valid object or a string in /in/sS3BI on line 3
Process exited with code 255.
Output for 5.0.0 - 5.2.5
Notice: Undefined property: stdClass::$class_name in /in/sS3BI on line 3 Fatal error: Class name must be a valid object or a string in /in/sS3BI on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Notice: Undefined property: class_name in /in/sS3BI on line 3 Fatal error: Cannot instantiate non-existent class: in /in/sS3BI on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined property: class_name in /in/sS3BI on line 3 Fatal error: Cannot instantiate non-existent class: in /in/sS3BI on line 3