3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hot = array( 'hotObj 1', 'hotObj 2', 'hotObj 3', 'hotObj 4', ); $new = array( 'newObj 1', 'newObj 2', ); $count = (count($hot) > count($new)) ? count($hot) : count($new); $result = []; for($i= 0; $i < $count;$i++){ if(isset($hot[$i])){ $result[] = $hot[$i]; } if(isset($new[$i])){ $result[] = $new[$i]; } } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 15
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 15
Branch analysis from position: 28
Branch analysis from position: 15
Branch analysis from position: 25
Branch analysis from position: 20
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
filename:       /in/eOTbe
function name:  (null)
number of ops:  32
compiled vars:  !0 = $hot, !1 = $new, !2 = $count, !3 = $result, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   14     2        COUNT                                            ~7      !0
          3        COUNT                                            ~8      !1
          4        IS_SMALLER                                               ~8, ~7
          5      > JMPZ                                                     ~9, ->9
          6    >   COUNT                                            ~10     !0
          7        QM_ASSIGN                                        ~11     ~10
          8      > JMP                                                      ->11
          9    >   COUNT                                            ~12     !1
         10        QM_ASSIGN                                        ~11     ~12
         11    >   ASSIGN                                                   !2, ~11
   16    12        ASSIGN                                                   !3, <array>
   18    13        ASSIGN                                                   !4, 0
         14      > JMP                                                      ->26
   19    15    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, !4
         16      > JMPZ                                                     ~16, ->20
   20    17    >   FETCH_DIM_R                                      ~18     !0, !4
         18        ASSIGN_DIM                                               !3
         19        OP_DATA                                                  ~18
   22    20    >   ISSET_ISEMPTY_DIM_OBJ                         0          !1, !4
         21      > JMPZ                                                     ~19, ->25
   23    22    >   FETCH_DIM_R                                      ~21     !1, !4
         23        ASSIGN_DIM                                               !3
         24        OP_DATA                                                  ~21
   18    25    >   PRE_INC                                                  !4
         26    >   IS_SMALLER                                               !4, !2
         27      > JMPNZ                                                    ~23, ->15
   26    28    >   INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
229.96 ms | 1006 KiB | 14 Q