3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,4,5,2,3,6,9]; function sortNums($array) { for ($i = 0; $i < count($array) - 1; $i++ ) { $min = $array[$i]; for ($j = $i+1; $j<count($array)-1; $j++) { $cur = $array[$j]; if ($cur > $min) { echo $cur . "<br>"; }; }; }; }; sortNums($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8iHgM
function name:  (null)
number of ops:  5
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'sortnums'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function sortnums:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 3
Branch analysis from position: 24
Branch analysis from position: 3
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
Branch analysis from position: 8
Branch analysis from position: 14
filename:       /in/8iHgM
function name:  sortNums
number of ops:  25
compiled vars:  !0 = $array, !1 = $i, !2 = $min, !3 = $j, !4 = $cur
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->20
    7     3    >   FETCH_DIM_R                                      ~6      !0, !1
          4        ASSIGN                                                   !2, ~6
    8     5        ADD                                              ~8      !1, 1
          6        ASSIGN                                                   !3, ~8
          7      > JMP                                                      ->15
    9     8    >   FETCH_DIM_R                                      ~10     !0, !3
          9        ASSIGN                                                   !4, ~10
   10    10        IS_SMALLER                                               !2, !4
         11      > JMPZ                                                     ~12, ->14
   11    12    >   CONCAT                                           ~13     !4, '%3Cbr%3E'
         13        ECHO                                                     ~13
    8    14    >   PRE_INC                                                  !3
         15    >   COUNT                                            ~15     !0
         16        SUB                                              ~16     ~15, 1
         17        IS_SMALLER                                               !3, ~16
         18      > JMPNZ                                                    ~17, ->8
    6    19    >   PRE_INC                                                  !1
         20    >   COUNT                                            ~19     !0
         21        SUB                                              ~20     ~19, 1
         22        IS_SMALLER                                               !1, ~20
         23      > JMPNZ                                                    ~21, ->3
   15    24    > > RETURN                                                   null

End of function sortnums

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.54 ms | 1390 KiB | 14 Q