3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = ['a','b','c','d','e','f']; $res = array(); $size = count($arr); for($i=$size-1;$i>=0;$i--){ $arr[$size] = $arr[$i]; unset($arr[$i]); $size++; } var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/mEHJU
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr, !1 = $res, !2 = $size, !3 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        ASSIGN                                                       !1, <array>
    6     2        COUNT                                                ~6      !0
          3        ASSIGN                                                       !2, ~6
    7     4        SUB                                                  ~8      !2, 1
          5        ASSIGN                                                       !3, ~8
          6      > JMP                                                          ->13
    8     7    >   FETCH_DIM_R                                          ~11     !0, !3
          8        ASSIGN_DIM                                                   !0, !2
          9        OP_DATA                                                      ~11
    9    10        UNSET_DIM                                                    !0, !3
   10    11        PRE_INC                                                      !2
    7    12        PRE_DEC                                                      !3
         13    >   IS_SMALLER_OR_EQUAL                                          0, !3
         14      > JMPNZ                                                        ~14, ->7
   13    15    >   INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.8 ms | 2109 KiB | 15 Q