3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Obc { function __toString() { return "chips"; } } $a = new StdClass(); $b = new Obc(); echo $b; echo $a;
based on 7RsPs
Output for 7.1.0 - 7.2.0
chips Recoverable fatal error: Object of class stdClass could not be converted to string in /in/GW7mC on line 11
Process exited with code 255.
Output for 5.3.20 - 7.0.20
chips Catchable fatal error: Object of class stdClass could not be converted to string in /in/GW7mC on line 11
Process exited with code 255.