3v4l.org

run code in 300+ PHP versions simultaneously
<?php $j = 0; $num = array(1, 2, 3, 4, 5); for($i = 4; $i = 0; $i--) { $num[$i] = $num[$j]; $j++; } print_r($num);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/5YW7J
function name:  (null)
number of ops:  15
compiled vars:  !0 = $j, !1 = $num, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 4
          3      > JMP                                                      ->9
    5     4    >   FETCH_DIM_R                                      ~7      !1, !0
          5        ASSIGN_DIM                                               !1, !2
          6        OP_DATA                                                  ~7
    6     7        PRE_INC                                                  !0
    4     8        PRE_DEC                                                  !2
          9    >   ASSIGN                                           ~10     !2, 0
         10      > JMPNZ                                                    ~10, ->4
    8    11    >   INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.43 ms | 1399 KiB | 15 Q