3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = microtime(true); $array = array(3,4,1,3,5,1,92,2,4124,424,52,12); for ($c=0;$c<100000;$c++) { for ($i=0;$i<count($array);$i++) { for ($y=0;$y<count($array)-1;$y++) { if ($array[$y+1] < $array[$y]) { $t = $array[$y]; $array[$y] = $array[$y+1]; $array[$y+1] = $t; } } } } print_r($array); echo microtime(true) - $starttime;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 9
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 7
Branch analysis from position: 37
Branch analysis from position: 7
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 11
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 9
Branch analysis from position: 34
Branch analysis from position: 9
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 25
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 11
Branch analysis from position: 30
Branch analysis from position: 11
Branch analysis from position: 25
filename:       /in/9jBX5
function name:  (null)
number of ops:  46
compiled vars:  !0 = $starttime, !1 = $array, !2 = $c, !3 = $i, !4 = $y, !5 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    3     4        ASSIGN                                                   !1, <array>
    5     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->35
    6     7    >   ASSIGN                                                   !3, 0
          8      > JMP                                                      ->31
    7     9    >   ASSIGN                                                   !4, 0
         10      > JMP                                                      ->26
    8    11    >   ADD                                              ~12     !4, 1
         12        FETCH_DIM_R                                      ~13     !1, ~12
         13        FETCH_DIM_R                                      ~14     !1, !4
         14        IS_SMALLER                                               ~13, ~14
         15      > JMPZ                                                     ~15, ->25
    9    16    >   FETCH_DIM_R                                      ~16     !1, !4
         17        ASSIGN                                                   !5, ~16
   10    18        ADD                                              ~19     !4, 1
         19        FETCH_DIM_R                                      ~20     !1, ~19
         20        ASSIGN_DIM                                               !1, !4
         21        OP_DATA                                                  ~20
   11    22        ADD                                              ~21     !4, 1
         23        ASSIGN_DIM                                               !1, ~21
         24        OP_DATA                                                  !5
    7    25    >   PRE_INC                                                  !4
         26    >   COUNT                                            ~24     !1
         27        SUB                                              ~25     ~24, 1
         28        IS_SMALLER                                               !4, ~25
         29      > JMPNZ                                                    ~26, ->11
    6    30    >   PRE_INC                                                  !3
         31    >   COUNT                                            ~28     !1
         32        IS_SMALLER                                               !3, ~28
         33      > JMPNZ                                                    ~29, ->9
    5    34    >   PRE_INC                                                  !2
         35    >   IS_SMALLER                                               !2, 100000
         36      > JMPNZ                                                    ~31, ->7
   17    37    >   INIT_FCALL                                               'print_r'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                                 
   18    40        INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $33     
         43        SUB                                              ~34     $33, !0
         44        ECHO                                                     ~34
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.54 ms | 1400 KiB | 17 Q