3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_sort(&$a) { for($x=0;$x<count($a);++$x) { $min = $x; for($y=$x+1;$y<count($a);++$y) { if($a[$y] < $a[$min] ) { $temp = $a[$min]; $a[$min] = $a[$y]; $a[$y] = $temp; } } } } $a = array(51,14,1,21,'hj'); array_sort($a); print_r($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dJYde
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'array_sort'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   20     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   21     7      > RETURN                                                   1

Function array_sort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
Branch analysis from position: 3
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
Branch analysis from position: 7
Branch analysis from position: 18
filename:       /in/dJYde
function name:  array_sort
number of ops:  27
compiled vars:  !0 = $a, !1 = $x, !2 = $min, !3 = $y, !4 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->23
    6     3    >   ASSIGN                                                   !2, !1
    7     4        ADD                                              ~7      !1, 1
          5        ASSIGN                                                   !3, ~7
          6      > JMP                                                      ->19
    9     7    >   FETCH_DIM_R                                      ~9      !0, !3
          8        FETCH_DIM_R                                      ~10     !0, !2
          9        IS_SMALLER                                               ~9, ~10
         10      > JMPZ                                                     ~11, ->18
   11    11    >   FETCH_DIM_R                                      ~12     !0, !2
         12        ASSIGN                                                   !4, ~12
   12    13        FETCH_DIM_R                                      ~15     !0, !3
         14        ASSIGN_DIM                                               !0, !2
         15        OP_DATA                                                  ~15
   13    16        ASSIGN_DIM                                               !0, !3
         17        OP_DATA                                                  !4
    7    18    >   PRE_INC                                                  !3
         19    >   COUNT                                            ~18     !0
         20        IS_SMALLER                                               !3, ~18
         21      > JMPNZ                                                    ~19, ->7
    4    22    >   PRE_INC                                                  !1
         23    >   COUNT                                            ~21     !0
         24        IS_SMALLER                                               !1, ~21
         25      > JMPNZ                                                    ~22, ->3
   17    26    > > RETURN                                                   null

End of function array_sort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.47 ms | 1403 KiB | 16 Q