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]; echo(" tmp0: ".$tmp0); $arr[$i+1]=$tmp1; $tmp1 = $arr[$j+1]; echo(" tmp1: ".$tmp1); echo("\n"); printIt($arr); echo("\n"); } echo("\n"); function printIt($arr){ 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 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 9
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 9
Branch analysis from position: 36
Branch analysis from position: 9
filename:       /in/Y9Xik
function name:  (null)
number of ops:  38
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                                                      ->32
    8     9    >   CONCAT                                           ~14     '++i%3A+', !4
         10        ECHO                                                     ~14
    9    11        ASSIGN_DIM                                               !0, !4
         12        OP_DATA                                                  !1
   10    13        FETCH_DIM_R                                      ~16     !0, !4
         14        ASSIGN                                                   !1, ~16
   11    15        CONCAT                                           ~18     '+tmp0%3A+', !1
         16        ECHO                                                     ~18
   12    17        ADD                                              ~19     !4, 1
         18        ASSIGN_DIM                                               !0, ~19
         19        OP_DATA                                                  !2
   13    20        ADD                                              ~21     !5, 1
         21        FETCH_DIM_R                                      ~22     !0, ~21
         22        ASSIGN                                                   !2, ~22
   14    23        CONCAT                                           ~24     '+tmp1%3A+', !2
         24        ECHO                                                     ~24
   15    25        ECHO                                                     '%0A'
   16    26        INIT_FCALL_BY_NAME                                       'printIt'
         27        SEND_VAR_EX                                              !0
         28        DO_FCALL                                      0          
   17    29        ECHO                                                     '%0A'
    7    30        ASSIGN_OP                                     1          !4, 2
         31        PRE_INC                                                  !5
         32    >   COUNT                                            ~28     !0
         33        SUB                                              ~29     ~28, 2
         34        IS_SMALLER                                               !4, ~29
         35      > JMPNZ                                                    ~30, ->9
   19    36    >   ECHO                                                     '%0A'
   26    37      > RETURN                                                   1

Function printit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/Y9Xik
function name:  printIt
number of ops:  11
compiled vars:  !0 = $arr, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   22     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
   23     3    >   FETCH_DIM_R                                      ~3      !0, !1
          4        CONCAT                                           ~4      ~3, '++'
          5        ECHO                                                     ~4
   22     6        PRE_INC                                                  !1
          7    >   COUNT                                            ~6      !0
          8        IS_SMALLER                                               !1, ~6
          9      > JMPNZ                                                    ~7, ->3
   25    10    > > RETURN                                                   null

End of function printit

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1399 KiB | 13 Q