3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xn = []; for($i=0;$i<1<<16;++$i) { $xn[] = mt_rand(0, 1<<8); } $t = microtime(); foreach($xn as $n) { if($n > 1<<7) { //.. } else { } } echo microtime() - $t; sort($xn); echo PHP_EOL; $t = microtime(); foreach($xn as $n) { if($n > 1<<7) { //.. } else { } } echo microtime() - $t;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 20
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 38
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 38
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 21
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/5huD5
function name:  (null)
number of ops:  45
compiled vars:  !0 = $xn, !1 = $i, !2 = $t, !3 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->10
    5     3    >   INIT_FCALL                                               'mt_rand'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 256
          6        DO_ICALL                                         $7      
          7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  $7
    3     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 65536
         11      > JMPNZ                                                    ~9, ->3
    8    12    >   INIT_FCALL                                               'microtime'
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
    9    15      > FE_RESET_R                                       $12     !0, ->21
         16    > > FE_FETCH_R                                               $12, !3, ->21
   11    17    >   IS_SMALLER                                               128, !3
         18      > JMPZ                                                     ~13, ->20
         19    > > JMP                                                      ->20
    9    20    > > JMP                                                      ->16
         21    >   FE_FREE                                                  $12
   18    22        INIT_FCALL                                               'microtime'
         23        DO_ICALL                                         $14     
         24        SUB                                              ~15     $14, !2
         25        ECHO                                                     ~15
   19    26        INIT_FCALL                                               'sort'
         27        SEND_REF                                                 !0
         28        DO_ICALL                                                 
   20    29        ECHO                                                     '%0A'
   22    30        INIT_FCALL                                               'microtime'
         31        DO_ICALL                                         $17     
         32        ASSIGN                                                   !2, $17
   23    33      > FE_RESET_R                                       $19     !0, ->39
         34    > > FE_FETCH_R                                               $19, !3, ->39
   25    35    >   IS_SMALLER                                               128, !3
         36      > JMPZ                                                     ~20, ->38
         37    > > JMP                                                      ->38
   23    38    > > JMP                                                      ->34
         39    >   FE_FREE                                                  $19
   32    40        INIT_FCALL                                               'microtime'
         41        DO_ICALL                                         $21     
         42        SUB                                              ~22     $21, !2
         43        ECHO                                                     ~22
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.43 ms | 1009 KiB | 16 Q