3v4l.org

run code in 200+ 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; case "D":;"E":;"F" : $number = 3;break; } } $newPhoneNumber .= $number; } $newPhoneNumbers[] = implode("-",str_split($newPhoneNumber,3)); }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.24
Parse error: syntax error, unexpected ':' in /in/G8MbQ on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ':' in /in/G8MbQ on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/G8MbQ on line 10
Process exited with code 255.