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)/1000; echo "\n"; $time = microtime(); for($i=0; $i < 1000; $i++) { mt_rand(1,9999999); } echo $time = (microtime()-$time)/1000;
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 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 24
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 24
Branch analysis from position: 31
Branch analysis from position: 24
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/tTSiY
function name:  (null)
number of ops:  38
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        DIV                                              ~10     ~9, 1000
         16        ASSIGN                                           ~11     !0, ~10
         17        ECHO                                                     ~11
    8    18        ECHO                                                     '%0A'
    9    19        INIT_FCALL                                               'microtime'
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !0, $12
   10    22        ASSIGN                                                   !1, 0
         23      > JMP                                                      ->29
   11    24    >   INIT_FCALL                                               'mt_rand'
         25        SEND_VAL                                                 1
         26        SEND_VAL                                                 9999999
         27        DO_ICALL                                                 
   10    28        PRE_INC                                                  !1
         29    >   IS_SMALLER                                               !1, 1000
         30      > JMPNZ                                                    ~17, ->24
   13    31    >   INIT_FCALL                                               'microtime'
         32        DO_ICALL                                         $18     
         33        SUB                                              ~19     $18, !0
         34        DIV                                              ~20     ~19, 1000
         35        ASSIGN                                           ~21     !0, ~20
         36        ECHO                                                     ~21
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.69 ms | 1400 KiB | 19 Q