3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { } var_dump(strlen(new Foo()));
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: strlen() expects parameter 1 to be string, object given in /in/S4pQU on line 3 NULL
Output for 5.2.0 - 5.2.17
Catchable fatal error: Object of class Foo could not be converted to string in /in/S4pQU on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Notice: Object of class Foo to string conversion in /in/S4pQU on line 3 int(6)
Output for 4.3.0 - 4.4.9
Notice: Object to string conversion in /in/S4pQU on line 3 int(6)