3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for ($i = 0; $i < 100000000; $i++) { rand(); } $end = microtime(true) - $start; printf("%0.6F\n", $end); $start = microtime(true); for ($i = 0; $i < 100000000; $i++) { mt_rand(); } $end = microtime(true) - $start; printf("%0.6F\n", $end);
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 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 26
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 26
Branch analysis from position: 31
Branch analysis from position: 26
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/FCIq8
function name:  (null)
number of ops:  41
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, 100000000
         10      > JMPNZ                                                    ~8, ->6
    7    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $9      
         14        SUB                                              ~10     $9, !0
         15        ASSIGN                                                   !2, ~10
    8    16        INIT_FCALL                                               'printf'
         17        SEND_VAL                                                 '%250.6F%0A'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $13     
         23        ASSIGN                                                   !0, $13
   11    24        ASSIGN                                                   !1, 0
         25      > JMP                                                      ->29
   12    26    >   INIT_FCALL                                               'mt_rand'
         27        DO_ICALL                                                 
   11    28        PRE_INC                                                  !1
         29    >   IS_SMALLER                                               !1, 100000000
         30      > JMPNZ                                                    ~18, ->26
   14    31    >   INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $19     
         34        SUB                                              ~20     $19, !0
         35        ASSIGN                                                   !2, ~20
   15    36        INIT_FCALL                                               'printf'
         37        SEND_VAL                                                 '%250.6F%0A'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.07 ms | 1400 KiB | 21 Q