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); $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 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 22
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 22
Branch analysis from position: 29
Branch analysis from position: 22
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/G8rrR
function name:  (null)
number of ops:  35
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
    9    17        INIT_FCALL                                               'microtime'
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !0, $11
   10    20        ASSIGN                                                   !1, 0
         21      > JMP                                                      ->27
   11    22    >   INIT_FCALL                                               'mt_rand'
         23        SEND_VAL                                                 1
         24        SEND_VAL                                                 9999999
         25        DO_ICALL                                                 
   10    26        PRE_INC                                                  !1
         27    >   IS_SMALLER                                               !1, 1000
         28      > JMPNZ                                                    ~16, ->22
   13    29    >   INIT_FCALL                                               'microtime'
         30        DO_ICALL                                         $17     
         31        SUB                                              ~18     $17, !0
         32        ASSIGN                                           ~19     !0, ~18
         33        ECHO                                                     ~19
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.78 ms | 1388 KiB | 19 Q