<?php
$itineary = 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;
}));
- Output for 5.4.18 - 5.4.32
- Parse error: syntax error, unexpected 'At' (T_STRING), expecting ')' in /in/gKZUm on line 3
Process exited with code 255. - Output for 5.4.0 - 5.4.17
- Parse error: syntax error, unexpected 'At' (T_STRING), expecting ')' in /in/uXfL3 on line 3
Process exited with code 255. - Output for 5.3.28 - 5.3.29
- Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/gKZUm on line 3
Process exited with code 255. - Output for 5.3.0 - 5.3.27
- Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/uXfL3 on line 3
Process exited with code 255.
preferences:
186.26 ms | 1395 KiB | 70 Q