3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(0xac); var_dump("0xac" + 1); echo PHP_EOL; var_dump(42); var_dump("42" + 1); echo PHP_EOL; var_dump(0b10010); var_dump("0b10010" + 1);
Output for 7.1.0
int(172) Notice: A non well formed numeric value encountered in /in/P5lLl on line 4 int(1) int(42) int(43) int(18) Notice: A non well formed numeric value encountered in /in/P5lLl on line 14 int(1)
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
int(172) int(1) int(42) int(43) int(18) int(1)
Output for 5.4.0 - 5.6.28
int(172) int(173) int(42) int(43) int(18) int(1)
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/P5lLl on line 13
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/P5lLl on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/P5lLl on line 13
Process exited with code 255.