3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $account_numbers = ["1234567890","12345678901234567890","1234567890123", "0000002150895","9500053963411","08014897121650000016"]; $utility_id = 1; foreach ($account_numbers as $anum) { for($i=0;$i<strlen($anum);$i++) { $char = substr($anum,$i,1); $newchar = $char == "0" ? 0 : 10-(int)$char; echo $newchar; } echo PHP_EOL; }
based on vB641
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
9876543210 98765432109876543210 9876543210987 0000008950215 1500057147699 02096213989450000094