3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [1 => 19, 2 => 2, 3 => 2018]; $arr2 = [1 => 19, 2 => 1, 3 => 2017]; $arr3 = [1 => 18, 2 => 2, 3 => 2016]; $mynewArray = [$arr1,$arr2,$arr3]; print_r($mynewArray);

preferences:
24.49 ms | 404 KiB | 5 Q