3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { public funtion __toString() { echo "MyContent"; } } $o = new Car(); echo $o;
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'funtion' (T_STRING), expecting variable (T_VARIABLE) in /in/e5Q4A on line 5
Process exited with code 255.

preferences:
155.75 ms | 1395 KiB | 23 Q