3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = array( array( 'Category', 'fruit', 'carbs', ), array( 'Day 1 - Program', 'Eat banana', 'Eat bread', ), array( 'Day 1 - record', '', '', ), ); $output = call_user_func_array('array_map', array(-1=>array(NULL, NULL, NULL)) + $input); var_dump($output);
Output for 5.3.0 - 7.1.0
Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in /in/DB9s9 on line 21 NULL
Output for 4.3.2 - 5.2.17
Warning: array_map(): The first argument, 'Array', should be either NULL or a valid callback in /in/DB9s9 on line 21 NULL
Output for 4.3.0 - 4.3.1
Warning: array_map() [http://www.php.net/function.array-map]: The first argument, 'Array', should be either NULL or a valid callback in /in/DB9s9 on line 21 NULL