3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 1; $b = $a + $a++; echo $b.PHP_EOL; $a = 1; @ $b = $a + $a++; echo $b.PHP_EOL;
Output for 7.0.0 - 7.1.0
3 3
Output for 5.1.0 - 5.6.28
3 2
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.0.5
2 2
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Rv0tY on line 4 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Rv0tY on line 7 2PHP_EOL