3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $phoneNumbers = array('41N XR8 L143','CRCCCRZZ65','77U.641.2lL7','N9N 481N117','I00F7CIKOK','A7Z.Z3M.AAM0','G73-V1N-9572','8N5 54WECN85','6BF97B7711','F2W W0718W1','E16 EGTj6JE','EZNGUE2Q0E','6DI.6DW.D0D2','88W 6RW 0HWF'); echo count($phoneNumbers); for($i=0;$i<count($phoneNumbers);$i++) { $newPhoneNumber = ""; $phoneNumber= $phoneNumbers[$i]); for($j=0;$j<count($phoneNumber);$j++){ $number = $phoneNumber[$j]; ///echo $j."\r\n"; if(!is_numeric($number)){ switch($number){ case "A":; case "B":; case "C": $number = 2;break; case "D":; case "E":; case "F": $number = 3;break; case "G":; case "H":; case "I": $number = 4;break; case "J":; case "K":; case "L": $number = 5;break; case "M":; case "N":; case "O": $number = 6;break; case "P":; case "Q":; case "R":; case "S": $number = 7;break; case "T":; case "U":; case "V": $number = 8;break; case "W":; case "X":; case "Y":; case "Z": $number = 9;break; default : $number = ""; } } $newPhoneNumber = $newPhoneNumber.$number; //echo $number; } $newPhoneNumbers[] = implode("-",str_split($newPhoneNumber,3)); } print ($newPhoneNumbers[0]);
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected ')' in /in/Vo60I on line 6
Process exited with code 255.