3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = range(0, 100); shuffle($arr); $size = count($arr)-1; for ($i = $size; $i>=0; $i--) { for ($j = 0; $j<=($i-1); $j++) if ($arr[$j]>$arr[$j+1]) { $k = $arr[$j]; $arr[$j] = $arr[$j+1]; $arr[$j+1] = $k; } } print $size;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 13
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 15
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 13
Branch analysis from position: 36
Branch analysis from position: 13
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 15
Branch analysis from position: 33
Branch analysis from position: 15
Branch analysis from position: 29
filename:       /in/3sQhg
function name:  (null)
number of ops:  38
compiled vars:  !0 = $arr, !1 = $size, !2 = $i, !3 = $j, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 100
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
    4     5        INIT_FCALL                                               'shuffle'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
    5     8        COUNT                                            ~8      !0
          9        SUB                                              ~9      ~8, 1
         10        ASSIGN                                                   !1, ~9
    6    11        ASSIGN                                                   !2, !1
         12      > JMP                                                      ->34
    7    13    >   ASSIGN                                                   !3, 0
         14      > JMP                                                      ->30
    8    15    >   FETCH_DIM_R                                      ~13     !0, !3
         16        ADD                                              ~14     !3, 1
         17        FETCH_DIM_R                                      ~15     !0, ~14
         18        IS_SMALLER                                               ~15, ~13
         19      > JMPZ                                                     ~16, ->29
    9    20    >   FETCH_DIM_R                                      ~17     !0, !3
         21        ASSIGN                                                   !4, ~17
   10    22        ADD                                              ~20     !3, 1
         23        FETCH_DIM_R                                      ~21     !0, ~20
         24        ASSIGN_DIM                                               !0, !3
         25        OP_DATA                                                  ~21
   11    26        ADD                                              ~22     !3, 1
         27        ASSIGN_DIM                                               !0, ~22
         28        OP_DATA                                                  !4
    7    29    >   PRE_INC                                                  !3
         30    >   SUB                                              ~25     !2, 1
         31        IS_SMALLER_OR_EQUAL                                      !3, ~25
         32      > JMPNZ                                                    ~26, ->15
    6    33    >   PRE_DEC                                                  !2
         34    >   IS_SMALLER_OR_EQUAL                                      0, !2
         35      > JMPNZ                                                    ~28, ->13
   15    36    >   ECHO                                                     !1
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.26 ms | 1465 KiB | 15 Q