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; }; }; }; }; sortNums($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XN5Zj
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 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
Branch analysis from position: 3
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
Branch analysis from position: 8
Branch analysis from position: 13
filename:       /in/XN5Zj
function name:  sortNums
number of ops:  24
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                                                      ->19
    7     3    >   FETCH_DIM_R                                      ~6      !0, !1
          4        ASSIGN                                                   !2, ~6
    8     5        ADD                                              ~8      !1, 1
          6        ASSIGN                                                   !3, ~8
          7      > JMP                                                      ->14
    9     8    >   FETCH_DIM_R                                      ~10     !0, !3
          9        ASSIGN                                                   !4, ~10
   10    10        IS_SMALLER                                               !2, !4
         11      > JMPZ                                                     ~12, ->13
   11    12    >   ECHO                                                     !4
    8    13    >   PRE_INC                                                  !3
         14    >   COUNT                                            ~14     !0
         15        SUB                                              ~15     ~14, 1
         16        IS_SMALLER                                               !3, ~15
         17      > JMPNZ                                                    ~16, ->8
    6    18    >   PRE_INC                                                  !1
         19    >   COUNT                                            ~18     !0
         20        SUB                                              ~19     ~18, 1
         21        IS_SMALLER                                               !1, ~19
         22      > JMPNZ                                                    ~20, ->3
   15    23    > > RETURN                                                   null

End of function sortnums

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.94 ms | 1403 KiB | 14 Q