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'); foreach($phoneNumbers AS $phoneNumber) { $newPhoneNumber = ""; for($i=0;$i<count($phoneNumber);$i++){ $number = $phoneNumber[$i]; if(!is_numeric($number)){ switch($number){ case "A": "B": "C" : $number = 2;break; } } $newPhoneNumber .= $number; } $newPhoneNumbers[] = implode("-",str_split($newPhoneNumber,3)); }
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected ':' in /in/EFRM1 on line 11
Process exited with code 255.