<?php
$itinerary = array (array('portName'=>'Day At Sea'), array('portName'=>'Moscow'));
$badPorts = array('At Sea', 'Day At Sea', 'Cruising The Mediterranean Sea');
$image = '';
$image .= implode(',', array_reduce($itinerary,
function ($result, $item) use (&$index, $badPorts) {
if(!in_array($item['portName'], $badPorts)) $result[$index] = $item['portName'];
$index++;
return $result;
} array()));
- Output for 5.4.13
- Parse error: syntax error, unexpected 'array' (T_ARRAY) in /in/0YNte on line 10
Process exited with code 255. - Output for 5.4.0 - 5.4.12
- Parse error: syntax error, unexpected 'array' (T_ARRAY) in Drc8T on line 10
Process exited with code 255. - Output for 5.3.23
- Parse error: syntax error, unexpected T_ARRAY in /in/0YNte on line 10
Process exited with code 255. - Output for 5.3.0 - 5.3.22
- Parse error: syntax error, unexpected T_ARRAY in Drc8T on line 10
Process exited with code 255.
preferences:
173.65 ms | 1395 KiB | 45 Q