3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Car { public function __toString() { echo "MyContent"; } } $o = new Car(); echo $o;
based on e5Q4A
Output for 7.1.0 - 7.2.0
MyContent Recoverable fatal error: Method Car::__toString() must return a string value in /in/2pt53 on line 12
Process exited with code 255.
Output for 5.3.20 - 7.0.20
MyContent Catchable fatal error: Method Car::__toString() must return a string value in /in/2pt53 on line 12
Process exited with code 255.