3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $test[1] = 'a'; $test[4] = 'd'; $test[2] = 'b'; $test[3] = 'c'; $i=0; $count=0; $aoi_result = array(); while($count < 2 && $i <= 11) { if (isset($test[++$i])) { $count++; $aoi_result[$count] = $test[$i]; } } var_dump($aoi_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 = 46) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 13
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
Branch analysis from position: 24
Branch analysis from position: 20
Branch analysis from position: 24
filename:       /in/8FkT5
function name:  (null)
number of ops:  29
compiled vars:  !0 = $test, !1 = $i, !2 = $count, !3 = $aoi_result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN_DIM                                               !0, 1
          2        OP_DATA                                                  'a'
    6     3        ASSIGN_DIM                                               !0, 4
          4        OP_DATA                                                  'd'
    7     5        ASSIGN_DIM                                               !0, 2
          6        OP_DATA                                                  'b'
    8     7        ASSIGN_DIM                                               !0, 3
          8        OP_DATA                                                  'c'
   10     9        ASSIGN                                                   !1, 0
   11    10        ASSIGN                                                   !2, 0
   12    11        ASSIGN                                                   !3, <array>
   13    12      > JMP                                                      ->20
   14    13    >   PRE_INC                                          ~12     !1
         14        ISSET_ISEMPTY_DIM_OBJ                         0          !0, ~12
         15      > JMPZ                                                     ~13, ->20
   15    16    >   PRE_INC                                                  !2
   16    17        FETCH_DIM_R                                      ~16     !0, !1
         18        ASSIGN_DIM                                               !3, !2
         19        OP_DATA                                                  ~16
   13    20    >   IS_SMALLER                                       ~17     !2, 2
         21      > JMPZ_EX                                          ~17     ~17, ->24
         22    >   IS_SMALLER_OR_EQUAL                              ~18     !1, 11
         23        BOOL                                             ~17     ~18
         24    > > JMPNZ                                                    ~17, ->13
   20    25    >   INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.03 ms | 941 KiB | 16 Q