3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new class extends stdClass { }; var_dump(get_class($obj) . " some other string", strlen(get_class($obj)));
Output for 7.2.0
string(57) "class@anonymous/in/0EdFe0x7fdeeac9302b some other string" int(39)
Output for 7.1.10
string(57) "class@anonymous/in/0EdFe0x7f34d633f02b some other string" int(39)
Output for 7.1.7
string(57) "class@anonymous/in/0EdFe0x7f8d0741102b some other string" int(39)
Output for 7.1.6
string(57) "class@anonymous/in/0EdFe0x7f6b0237e02b some other string" int(39)
Output for 7.1.5
string(57) "class@anonymous/in/0EdFe0x7fed8ae7e02b some other string" int(39)
Output for 7.1.0
string(57) "class@anonymous/in/0EdFe0x7f2b2e63702b some other string" int(39)
Output for 7.0.20
string(57) "class@anonymous/in/0EdFe0x7f17a028d02b some other string" int(39)
Output for 7.0.6
string(57) "class@anonymous/in/0EdFe0x7f83711ea02b some other string" int(39)
Output for 7.0.5
string(57) "class@anonymous/in/0EdFe0x7fb6adaea02b some other string" int(39)
Output for 7.0.4
string(57) "class@anonymous/in/0EdFe0x7f42ba7f702b some other string" int(39)
Output for 7.0.3
string(57) "class@anonymous/in/0EdFe0x7f3fabde602b some other string" int(39)
Output for 7.0.2
string(57) "class@anonymous/in/0EdFe0x7f940334a02b some other string" int(39)
Output for 7.0.1
string(57) "class@anonymous/in/0EdFe0x7f9550ead02b some other string" int(39)
Output for 7.0.0
string(57) "class@anonymous/in/0EdFe0x7f7fe682c02b some other string" int(39)
Output for 5.4.0 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/0EdFe on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/0EdFe on line 3
Process exited with code 255.