3v4l.org

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