3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr1 = [1, 2, 3, 7, 8, 9]; $arr2 = [4, 5, 6, 10, 11, 12, 13, 14]; $result = []; while ($arr1 || $arr2) { array_push($result, ...array_splice($arr1, 0, 3), ...array_splice($arr2, 0, 3)); } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 4
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
Branch analysis from position: 22
Branch analysis from position: 22
filename:       /in/aGImR
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    6     2        ASSIGN                                                       !2, <array>
    7     3      > JMP                                                          ->20
    8     4    >   INIT_FCALL                                                   'array_push'
          5        SEND_REF                                                     !2
          6        INIT_FCALL                                                   'array_splice'
          7        SEND_REF                                                     !0
          8        SEND_VAL                                                     0
          9        SEND_VAL                                                     3
         10        DO_ICALL                                             $6      
         11        SEND_UNPACK                                                  $6
         12        INIT_FCALL                                                   'array_splice'
         13        SEND_REF                                                     !1
         14        SEND_VAL                                                     0
         15        SEND_VAL                                                     3
         16        DO_ICALL                                             $7      
         17        SEND_UNPACK                                                  $7
         18        CHECK_UNDEF_ARGS                                             
         19        DO_ICALL                                                     
    7    20    > > JMPNZ_EX                                             ~9      !0, ->22
         21    >   BOOL                                                 ~9      !1
         22    > > JMPNZ                                                        ~9, ->4
   10    23    >   INIT_FCALL                                                   'var_export'
         24        SEND_VAR                                                     !2
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.11 ms | 2015 KiB | 16 Q