3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $code = "03255000000"; $len = strlen($code); $i = 0; $sum = 0; do { $r = (string)($i+1); $sum = (string)($sum + $code[$i]*$r); echo $k.": ".$code[$i]." * $r = $sum\n"; $i++; }while($i < $len); echo (string)($sum%11); ?>
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 1 = 0 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 3 * 2 = 6 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 2 * 3 = 12 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 5 * 4 = 32 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 5 * 5 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 6 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 7 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 8 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 9 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 10 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 11 = 57 2
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 1 = 0 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 3 * 2 = 6 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 2 * 3 = 12 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 5 * 4 = 32 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 5 * 5 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 6 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 7 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 8 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 9 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 10 = 57 Notice: Undefined variable: k in /in/1e0Cg on line 10 : 0 * 11 = 57 2