3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $animal=array('type'=>'dog',"name"=>"Max"); $b=(object)$animal; echo $b; ?>
based on RScBG
Output for 7.1.0 - 7.2.6
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/CGe0p on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Catchable fatal error: Object of class stdClass could not be converted to string in /in/CGe0p on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/CGe0p:5 Stack trace: #0 {main}
Process exited with code 255.