3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = array( "name" => array("type" => "text", "null" => "NOT NULL"), "email" => array("type" => "text", "null" => "NOT NULL"), "tel" => array("type" => "text", "null" => "NOT NULL"), "warehouse" => array("type" => "text", "null" => "NOT NULL"), ); echo implode(', ', array_map(function ($k, $entry) { return $k; }, $input));
based on LqN81
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed and exactly 2 expected in /in/FtTUh:9 Stack trace: #0 [internal function]: {closure}(Array) #1 /in/FtTUh(11): array_map(Object(Closure), Array) #2 {main} thrown in /in/FtTUh on line 9
Process exited with code 255.
Output for 5.3.20 - 7.0.20
Warning: Missing argument 2 for {closure}() in /in/FtTUh on line 9 Warning: Missing argument 2 for {closure}() in /in/FtTUh on line 9 Warning: Missing argument 2 for {closure}() in /in/FtTUh on line 9 Warning: Missing argument 2 for {closure}() in /in/FtTUh on line 9 Notice: Array to string conversion in /in/FtTUh on line 11 Notice: Array to string conversion in /in/FtTUh on line 11 Notice: Array to string conversion in /in/FtTUh on line 11 Notice: Array to string conversion in /in/FtTUh on line 11 Array, Array, Array, Array