3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n=5; for($i=1;$i<=10;$i++) { $m=$i*n; echo "$n*$i=$m"; }
Output for 7.2.0
Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*1=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*2=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*3=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*4=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*5=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*6=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*7=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*8=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*9=0 Warning: Use of undefined constant n - assumed 'n' (this will throw an Error in a future version of PHP) in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*10=0
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*1=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*2=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*3=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*4=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*5=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*6=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*7=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*8=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*9=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 Warning: A non-numeric value encountered in /in/Ttiod on line 5 5*10=0
Output for 5.3.18 - 7.0.20
Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*1=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*2=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*3=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*4=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*5=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*6=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*7=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*8=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*9=0 Notice: Use of undefined constant n - assumed 'n' in /in/Ttiod on line 5 5*10=0