3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $items = array( array( array("Color" => "Blue"), array("Size" => "S") ), array( array("Color" => "Blue"), array("Size" => "M") ) ); $new_items = array_map(function ($item) { $seed = array(); return array_reduce($item, function ($seed, $value) { return array_map(function function () { $seed[] = $value; }, $key_values); return $seed; }, array()); }, $items); var_dump($new_items);
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting '(' in /in/BeRi0 on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FUNCTION, expecting '(' in /in/BeRi0 on line 16
Process exited with code 255.