3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 1; $n = 2; for($f = 0; $f <= 20; $f++) { echo "F".$f." = ".$f-$i+$f-$n."\n"; $i++; $n++; }
based on YEglp
Output for 7.1.0
Warning: A non-numeric value encountered in /in/0JdkG on line 5 -3 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -4 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -5 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -6 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -7 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -8 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -9 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -10 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -11 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -12 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -13 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -14 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -15 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -16 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -17 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -18 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -19 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -20 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -21 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -22 Warning: A non-numeric value encountered in /in/0JdkG on line 5 -23
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.0.14
-3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23
Output for hhvm-3.10.0

Process exited with code 153.