3v4l.org

run code in 300+ PHP versions simultaneously
<?php $front = ["front_first", "front_second"]; $inside = ["inside_first", "inside_second", "inside_third"]; $back = ["back_first", "back_second", "back_third", "back_fourth"]; var_export( array_merge( ...array_map( function(...$cols) { static $lastSet; foreach ($cols as $i => &$v) { $v ??= $lastSet[$i]; } $lastSet = $cols; return $cols; }, $back, $front, $inside ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eTVZ3
function name:  (null)
number of ops:  18
compiled vars:  !0 = $front, !1 = $inside, !2 = $back
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
    7     3        INIT_FCALL                                               'var_export'
    8     4        INIT_FCALL                                               'array_merge'
    9     5        INIT_FCALL                                               'array_map'
   10     6        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
   17     7        SEND_VAL                                                 ~6
   18     8        SEND_VAR                                                 !2
   19     9        SEND_VAR                                                 !0
   20    10        SEND_VAR                                                 !1
    9    11        DO_ICALL                                         $7      
   20    12        SEND_UNPACK                                              $7
         13        CHECK_UNDEF_ARGS                                         
    8    14        DO_ICALL                                         $8      
   20    15        SEND_VAR                                                 $8
    7    16        DO_ICALL                                                 
   23    17      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/eTVZ3
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $cols, !1 = $lastSet, !2 = $v, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_VARIADIC                                    !0      
   11     1        BIND_STATIC                                              !1
   12     2      > FE_RESET_RW                                      $4      !0, ->11
          3    > > FE_FETCH_RW                                      ~5      $4, !2, ->11
          4    >   ASSIGN                                                   !3, ~5
   13     5        COALESCE                                         ~7      !2
          6        FETCH_DIM_R                                      ~8      !1, !3
          7        ASSIGN                                           ~9      !2, ~8
          8        QM_ASSIGN                                        ~7      ~9
          9        FREE                                                     ~7
   12    10      > JMP                                                      ->3
         11    >   FE_FREE                                                  $4
   15    12        ASSIGN                                                   !1, !0
   16    13      > RETURN                                                   !0
   17    14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.37 ms | 1008 KiB | 16 Q