3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object1 = new \stdClass(); $object2 = new \stdClass(); $object1->car = 'Toyota'; $object2->food = 'Ham'; $object1->gender = 'Male'; try { throw new Exception('Exception1: ' . $object1 . ', Exception2: ' . $object2); } catch (\Exception $e) { $e->getMessage; }
Output for 7.1.0 - 7.2.0
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/mXE3H on line 12
Process exited with code 255.
Output for 5.3.19 - 7.0.20
Catchable fatal error: Object of class stdClass could not be converted to string in /in/mXE3H on line 12
Process exited with code 255.