3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [ 't' => [1,2,3], 'b' => [4,5,6] ]; $return = array_map( function ($tasks) { return $tasks; }, $tasksByDays ); var_dump($return);
Output for 7.0.20, 7.1.5 - 7.2.0
Notice: Undefined variable: tasksByDays in /in/3TLRX on line 12 Warning: array_map(): Argument #2 should be an array in /in/3TLRX on line 12 NULL
Output for 7.0.0 - 7.0.6, 7.1.0
Notice: Undefined variable: tasksByDays in /in/3TLRX on line 11 Warning: array_map(): Argument #2 should be an array in /in/3TLRX on line 11 NULL
Output for 5.4.10 - 5.6.28
Notice: Undefined variable: tasksByDays in /in/3TLRX on line 13 Warning: array_map(): Argument #2 should be an array in /in/3TLRX on line 13 NULL
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/3TLRX on line 3
Process exited with code 255.