3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump((0 == "thing")); var_dump((int) 'string'); var_dump((int) 'string1'); var_dump((int) '1string'); var_dump((int) '012'); var_dump(012); var_dump(0x0+2); var_dump(0x0 + 2); var_dump(0b0+1);
based on qKp6Q
Output for 5.4.1 - 7.2.0
bool(true) int(0) int(0) int(1) int(12) int(10) int(2) int(2) int(1)
Output for 5.4.0
bool(true) int(0) int(0) int(1) int(12) int(10) int(2) int(2) int(2)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/Xgamg on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/Xgamg on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Xgamg on line 12
Process exited with code 255.