3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = str_split('250076640'); for ($i=1; $i<=8; $i++) { $dC += ($a[$i-1]) * (10-$i); } echo "\n $dC"; $dC = $a[0] * 9 + $a[1] * 8 + $a[2] * 7 + $a[3] * 6 + $a[4] * 5 + $a[5] * 4 + $a[6] * 3 + $a[7] * 2; echo "\n $dC";
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: dC in /in/08snH on line 4 143 143
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: dC in /in/08snH on line 4 143 143
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/08snH on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/08snH on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/08snH on line 2