3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for ($i = 0; $i < 1000000; $i++) { rand(); } $end = microtime(true); printf("%0.6F\n"); $start = microtime(true); for ($i = 0; $i < 1000000; $i++) { mt_rand(); } $end = microtime(true); printf("%0.6F\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
Branch analysis from position: 24
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/sAiic
function name:  (null)
number of ops:  37
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->9
    5     6    >   INIT_FCALL                                               'rand'
          7        DO_ICALL                                                 
    4     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 1000000
         10      > JMPNZ                                                    ~8, ->6
    7    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !2, $9
    8    15        INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%250.6F%0A'
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !0, $12
   11    22        ASSIGN                                                   !1, 0
         23      > JMP                                                      ->27
   12    24    >   INIT_FCALL                                               'mt_rand'
         25        DO_ICALL                                                 
   11    26        PRE_INC                                                  !1
         27    >   IS_SMALLER                                               !1, 1000000
         28      > JMPNZ                                                    ~17, ->24
   14    29    >   INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $18     
         32        ASSIGN                                                   !2, $18
   15    33        INIT_FCALL                                               'printf'
         34        SEND_VAL                                                 '%250.6F%0A'
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.25 ms | 1400 KiB | 21 Q