3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ [2015 => '2015'], [2016 => '2016'], [2017 => '2017'], [2018 => '2018'], [2019 => '2019'], [2020 => '2020'], [2021 => '2021'], [2022 => '2022'], [2023 => '2023'] ]; $result = []; array_walk_recursive($years, function($v, $k) use (&$result) { $result[$k] = $v; }); var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQodA
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $result, !2 = $years
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   15     1        ASSIGN                                                       !1, <array>
   16     2        INIT_FCALL                                                   'array_walk_recursive'
          3        SEND_REF                                                     !2
          4        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          5        BIND_LEXICAL                                                 ~5, !1
          6        SEND_VAL                                                     ~5
          7        DO_ICALL                                                     
   17     8        INIT_FCALL                                                   'var_export'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQodA
function name:  {closure:/in/TQodA:16}
number of ops:  6
compiled vars:  !0 = $v, !1 = $k, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
          3        ASSIGN_DIM                                                   !2, !1
          4        OP_DATA                                                      !0
          5      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.79 ms | 1756 KiB | 15 Q