3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo 123 + 123 ; echo "\n"; echo 0123 + 123 ; echo "\n"; echo "\n"; echo "123" + 123 ; echo "\n"; echo "0123" + 123 ; echo "\n"; echo " 123" + 123 ; echo "\n"; echo "123 " + 123 ; echo "\n"; echo 123 + "123" ; echo "\n"; echo 123 + "0123" ; echo "\n"; echo 123 + " 123" ; echo "\n"; echo 123 + "123 "; echo "\n"; echo "\n"; echo "+123" + 123 ; echo "\n"; echo 123 + "+123" ; echo "\n"; echo "-123" + 123 ; echo "\n"; echo 123 + "-123" ; echo "\n"; echo "+ 123" + 123 ; echo "\n"; echo 123 + "+ 123" ; echo "\n"; echo "- 123" + 123 ; echo "\n"; echo 123 + "- 123" ; echo "\n"; echo 123 + - 123 ; echo "\n";
based on uIkZN
Output for 7.1.0
246 206 246 246 246 Notice: A non well formed numeric value encountered in /in/lEqiE on line 10 246 246 246 246 Notice: A non well formed numeric value encountered in /in/lEqiE on line 14 246 246 246 0 0 Warning: A non-numeric value encountered in /in/lEqiE on line 22 123 Warning: A non-numeric value encountered in /in/lEqiE on line 23 123 Warning: A non-numeric value encountered in /in/lEqiE on line 24 123 Warning: A non-numeric value encountered in /in/lEqiE on line 25 123 0
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.0.14
246 206 246 246 246 246 246 246 246 246 246 246 0 0 123 123 123 123 0
Output for hhvm-3.10.0

Process exited with code 153.