3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1,2,3,4,5,6,7,8,9,10,'a','b','c','d','e','f','g','h','i','j'); $tmp0 = $arr[0]; $tmp1 = $arr[10]; $n=10; for($i=0,$j=$n;$i<count($arr)-2;$i+=2,$j++){ echo(" i: ".$i); $arr[$i]=$tmp0; $tmp0 = $arr[$i+1]; echo(" tmp0: ".$tmp0); $arr[$i+1]=$tmp1; $tmp1 = $arr[$j+1]; echo(" tmp1: ".$tmp1); } echo("\n"); for($i=0;$i<count($arr);$i++){ echo($arr[$i]." "); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 9
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
Branch analysis from position: 35
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 9
Branch analysis from position: 32
Branch analysis from position: 9
filename:       /in/QBu7i
function name:  (null)
number of ops:  43
compiled vars:  !0 = $arr, !1 = $tmp0, !2 = $tmp1, !3 = $n, !4 = $i, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_DIM_R                                      ~7      !0, 0
          2        ASSIGN                                                   !1, ~7
    5     3        FETCH_DIM_R                                      ~9      !0, 10
          4        ASSIGN                                                   !2, ~9
    6     5        ASSIGN                                                   !3, 10
    7     6        ASSIGN                                                   !4, 0
          7        ASSIGN                                                   !5, !3
          8      > JMP                                                      ->28
    8     9    >   CONCAT                                           ~14     '++i%3A+', !4
         10        ECHO                                                     ~14
    9    11        ASSIGN_DIM                                               !0, !4
         12        OP_DATA                                                  !1
   10    13        ADD                                              ~16     !4, 1
         14        FETCH_DIM_R                                      ~17     !0, ~16
         15        ASSIGN                                                   !1, ~17
   11    16        CONCAT                                           ~19     '+tmp0%3A+', !1
         17        ECHO                                                     ~19
   12    18        ADD                                              ~20     !4, 1
         19        ASSIGN_DIM                                               !0, ~20
         20        OP_DATA                                                  !2
   13    21        ADD                                              ~22     !5, 1
         22        FETCH_DIM_R                                      ~23     !0, ~22
         23        ASSIGN                                                   !2, ~23
   14    24        CONCAT                                           ~25     '+tmp1%3A+', !2
         25        ECHO                                                     ~25
    7    26        ASSIGN_OP                                     1          !4, 2
         27        PRE_INC                                                  !5
         28    >   COUNT                                            ~28     !0
         29        SUB                                              ~29     ~28, 2
         30        IS_SMALLER                                               !4, ~29
         31      > JMPNZ                                                    ~30, ->9
   17    32    >   ECHO                                                     '%0A'
   19    33        ASSIGN                                                   !4, 0
         34      > JMP                                                      ->39
   20    35    >   FETCH_DIM_R                                      ~32     !0, !4
         36        CONCAT                                           ~33     ~32, '++'
         37        ECHO                                                     ~33
   19    38        PRE_INC                                                  !4
         39    >   COUNT                                            ~35     !0
         40        IS_SMALLER                                               !4, ~35
         41      > JMPNZ                                                    ~36, ->35
   22    42    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.56 ms | 1399 KiB | 13 Q