3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = (array("lol"=>"lol1", "text"=>"Haha"), array("lol"=>"lol2", "text"=>"Heheh")); $assoc_arr = array_reduce($arr, function ($result, $item) { $result[$item["lol"]][] =$item["lol"]; return $result; }, array()); var_dump($assoc_arr);
Output for 5.3.0 - 5.4.21
Parse error: syntax error, unexpected ',' in /in/5YvmC on line 2
Process exited with code 255.