<?php
$years = array(
array(2015 => '2015'),
array(2016 => '2016'),
array(2017 => '2017'),
array(2018 => '2018'),
array(2019 => '2019'),
array(2020 => '2020'),
array(2021 => '2021'),
array(2022 => '2022'),
array(2023 => '2023')
);
// var_export(array_merge(...$years)); // loses numeric associative keys
// var_export(call_user_func_array('array_merge', $years)); // loses numeric associative keys
// var_export(array_reduce($years, 'array_merge', array())); // loses numeric associative keys
var_export(iterator_to_array(new RecursiveIteratorIterator(new RecursiveArrayIterator($years))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/9rEm4
function name: (null)
number of ops: 14
compiled vars: !0 = $years
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN !0, <array>
18 1 INIT_FCALL 'var_export'
2 INIT_FCALL 'iterator_to_array'
3 NEW $2 'RecursiveIteratorIterator'
4 NEW $3 'RecursiveArrayIterator'
5 SEND_VAR_EX !0
6 DO_FCALL 0
7 SEND_VAR_NO_REF_EX $3
8 DO_FCALL 0
9 SEND_VAR $2
10 DO_ICALL $6
11 SEND_VAR $6
12 DO_ICALL
13 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
123.93 ms | 999 KiB | 15 Q