3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.0 - 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.3.0 - 5.3.23
Parse error: syntax error, unexpected T_ARRAY in /in/0YNte on line 10
Process exited with code 255.