3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $account_numbers = ["1234567890","12345678901234567890","1234567890123"]; $utility_id = 1; foreach ($account_numbers as $accountNumber) { //$customerNumber = str_pad($utility_id, 3, "0", STR_PAD_RIGHT); $hexnum = hexdec(md5($accountNumber)); $smallnum = $hexnum % 10; echo $smallnum . $PHP_EOL; }
based on WVnFC
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
Notice: Undefined variable: PHP_EOL in /in/6hJTI on line 9 0 Notice: Undefined variable: PHP_EOL in /in/6hJTI on line 9 0 Notice: Undefined variable: PHP_EOL in /in/6hJTI on line 9 0