3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = new class($i) {}; var_dump(get_class($foo));
Output for 7.2.0
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7f5c000fe01d"
Output for 7.1.10
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7fc9240aa01d"
Output for 7.1.7
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7f949e91401d"
Output for 7.1.6
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7fcd65ba401d"
Output for 7.1.5
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7f813b7f301d"
Output for 7.1.0
Notice: Undefined variable: i in /in/3K1Du on line 3 string(39) "class@anonymous/in/3K1Du0x7f9b9ceb201d"
Output for 7.0.20
string(39) "class@anonymous/in/3K1Du0x7fc8de36401d"
Output for 7.0.6
string(39) "class@anonymous/in/3K1Du0x7f4d991fc01d"
Output for 7.0.5
string(39) "class@anonymous/in/3K1Du0x7f4547db401d"
Output for 7.0.4
string(39) "class@anonymous/in/3K1Du0x7f165311701d"
Output for 7.0.3
string(39) "class@anonymous/in/3K1Du0x7ff5ea1bd01d"
Output for 7.0.2
string(39) "class@anonymous/in/3K1Du0x7f58b1fc901d"
Output for 7.0.1
string(39) "class@anonymous/in/3K1Du0x7f4c240e001d"
Output for 7.0.0
string(39) "class@anonymous/in/3K1Du0x7f168036e01d"
Output for 5.4.9 - 5.6.21
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/3K1Du 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/3K1Du on line 3
Process exited with code 255.