3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = microtime(true); $array = \SplFixedStorage::fromArray([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 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 12
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 14
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 12
Branch analysis from position: 40
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 16
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 14
Branch analysis from position: 37
Branch analysis from position: 14
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 16
Branch analysis from position: 34
Branch analysis from position: 16
Branch analysis from position: 30
filename:       /in/Dk4ov
function name:  (null)
number of ops:  46
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        INIT_STATIC_METHOD_CALL                                  'SplFixedStorage', 'fromArray'
          5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0  $9      
          7        ASSIGN                                                   !1, $9
    5     8        COUNT                                            ~11     !1
          9        ASSIGN                                                   !2, ~11
    7    10        ASSIGN                                                   !3, 0
         11      > JMP                                                      ->38
    8    12    >   ASSIGN                                                   !4, 0
         13      > JMP                                                      ->35
    9    14    >   ASSIGN                                                   !5, 0
         15      > JMP                                                      ->31
   10    16    >   ADD                                              ~16     !5, 1
         17        FETCH_DIM_R                                      ~17     !1, ~16
         18        FETCH_DIM_R                                      ~18     !1, !5
         19        IS_SMALLER                                               ~17, ~18
         20      > JMPZ                                                     ~19, ->30
   11    21    >   FETCH_DIM_R                                      ~20     !1, !5
         22        ASSIGN                                                   !6, ~20
   12    23        ADD                                              ~23     !5, 1
         24        FETCH_DIM_R                                      ~24     !1, ~23
         25        ASSIGN_DIM                                               !1, !5
         26        OP_DATA                                                  ~24
   13    27        ADD                                              ~25     !5, 1
         28        ASSIGN_DIM                                               !1, ~25
         29        OP_DATA                                                  !6
    9    30    >   PRE_INC                                                  !5
         31    >   SUB                                              ~28     !2, 1
         32        IS_SMALLER                                               !5, ~28
         33      > JMPNZ                                                    ~29, ->16
    8    34    >   PRE_INC                                                  !4
         35    >   IS_SMALLER                                               !4, !2
         36      > JMPNZ                                                    ~31, ->14
    7    37    >   PRE_INC                                                  !3
         38    >   IS_SMALLER                                               !3, 100000
         39      > JMPNZ                                                    ~33, ->12
   19    40    >   INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $34     
         43        SUB                                              ~35     $34, !0
         44        ECHO                                                     ~35
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.14 ms | 1400 KiB | 15 Q