3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f=fn($a,$f)=>$a?array_merge(array_shift($a),$f(array_reverse($a?next($a)?array_map(null,...$a):array_chunk($a[0],1):$a),$f)):$a; print_r( $f([[1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7]], $f) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R0mqJ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FR0mqJ%3A3%240'
          1        ASSIGN                                                   !0, ~1
    5     2        INIT_FCALL                                               'print_r'
    6     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              <array>
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
    7     9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FR0mqJ%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 40
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 30
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R0mqJ
function name:  {closure}
number of ops:  43
compiled vars:  !0 = $a, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > JMPZ                                                     !0, ->40
          3    >   INIT_FCALL                                               'array_merge'
          4        INIT_FCALL                                               'array_shift'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        INIT_DYNAMIC_CALL                                        !1
          9        INIT_FCALL                                               'array_reverse'
         10      > JMPZ                                                     !0, ->30
         11    >   INIT_FCALL                                               'next'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $3      
         14      > JMPZ                                                     $3, ->22
         15    >   INIT_FCALL                                               'array_map'
         16        SEND_VAL                                                 null
         17        SEND_UNPACK                                              !0
         18        CHECK_UNDEF_ARGS                                         
         19        DO_ICALL                                         $4      
         20        QM_ASSIGN                                        ~5      $4
         21      > JMP                                                      ->28
         22    >   INIT_FCALL                                               'array_chunk'
         23        FETCH_DIM_R                                      ~6      !0, 0
         24        SEND_VAL                                                 ~6
         25        SEND_VAL                                                 1
         26        DO_ICALL                                         $7      
         27        QM_ASSIGN                                        ~5      $7
         28    >   QM_ASSIGN                                        ~8      ~5
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~8      !0
         31    >   SEND_VAL                                                 ~8
         32        DO_ICALL                                         $9      
         33        SEND_VAR_NO_REF_EX                                       $9
         34        SEND_VAR_EX                                              !1
         35        DO_FCALL                                      0  $10     
         36        SEND_VAR                                                 $10
         37        DO_ICALL                                         $11     
         38        QM_ASSIGN                                        ~12     $11
         39      > JMP                                                      ->41
         40    >   QM_ASSIGN                                        ~12     !0
         41    > > RETURN                                                   ~12
         42*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FR0mqJ%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.81 ms | 1400 KiB | 27 Q