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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.8 ms | 1400 KiB | 15 Q