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; $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 = 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/CbAlM
function name:  (null)
number of ops:  37
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
    9    18        INIT_FCALL                                               'microtime'
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !0, $12
   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                                                    ~17, ->23
   13    30    >   INIT_FCALL                                               'microtime'
         31        DO_ICALL                                         $18     
         32        SUB                                              ~19     $18, !0
         33        DIV                                              ~20     ~19, 1000
         34        ASSIGN                                           ~21     !0, ~20
         35        ECHO                                                     ~21
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1400 KiB | 19 Q