3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array(1,2,3), array(4,5,6), ); $data = array_map('reset', $data); print_r($data);
Output for 8.0.0 - 8.0.10, 8.1rc1
Warning: reset(): Argument #1 ($array) must be passed by reference, value given in /in/BdWq7 on line 8 Warning: reset(): Argument #1 ($array) must be passed by reference, value given in /in/BdWq7 on line 8 Array ( [0] => 1 [1] => 4 )
Output for 7.3.0 - 7.3.30, 7.4.0 - 7.4.23
Array ( [0] => 1 [1] => 4 )

preferences:
30.89 ms | 460 KiB | 5 Q