3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [0,1,2,3,4,5,6]; $count = count($a); for($i=0;$i<$count;$i++){ echo 's ' . $i.PHP_EOL; if ($a[$i]==3) { unset($a[$i]); $count--; $i--; $a=array_merge($a); } echo 'e ' . $i.PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 5
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 5
Branch analysis from position: 24
Branch analysis from position: 5
Branch analysis from position: 18
filename:       /in/bNtk6
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $count, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        COUNT                                            ~4      !0
          2        ASSIGN                                                   !1, ~4
    4     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->22
    5     5    >   CONCAT                                           ~7      's+', !2
          6        CONCAT                                           ~8      ~7, '%0A'
          7        ECHO                                                     ~8
    6     8        FETCH_DIM_R                                      ~9      !0, !2
          9        IS_EQUAL                                                 ~9, 3
         10      > JMPZ                                                     ~10, ->18
    7    11    >   UNSET_DIM                                                !0, !2
    8    12        PRE_DEC                                                  !1
    9    13        PRE_DEC                                                  !2
   10    14        INIT_FCALL                                               'array_merge'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $13     
         17        ASSIGN                                                   !0, $13
   12    18    >   CONCAT                                           ~15     'e+', !2
         19        CONCAT                                           ~16     ~15, '%0A'
         20        ECHO                                                     ~16
    4    21        PRE_INC                                                  !2
         22    >   IS_SMALLER                                               !2, !1
         23      > JMPNZ                                                    ~18, ->5
   13    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.39 ms | 1387 KiB | 15 Q