3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.03 ms | 1396 KiB | 19 Q