3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define('X', 500); define('Y', 5E2); define('Z', (int) 5E2); class MyClass { const A = 500; const B = 5E2; const C = 200 + 300; } var_dump(gettype(MyClass::A)); var_dump(gettype(MyClass::B)); var_dump(gettype(MyClass::C));
based on BHuHM
Output for 5.6.0 - 7.3.1
string(7) "integer" string(6) "double" string(7) "integer"
Output for 5.5.0 - 5.5.36
Parse error: syntax error, unexpected '+', expecting ',' or ';' in /in/hlb4j on line 9
Process exited with code 255.