3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 1000; $start = microtime(true); while ($i--) uniqid(); $elapsed = microtime(true) - $start; printf("%.3f\n", $elapsed * 1000); $i = 1000; $start = microtime(true); while ($i--) uniqid("", true); $elapsed = microtime(true) - $start; printf("%.3f\n", $elapsed * 1000);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/sH2tG
function name:  (null)
number of ops:  43
compiled vars:  !0 = $i, !1 = $start, !2 = $elapsed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1000
    4     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5      > JMP                                                      ->8
          6    >   INIT_FCALL                                               'uniqid'
          7        DO_ICALL                                                 
          8    >   POST_DEC                                         ~7      !0
          9      > JMPNZ                                                    ~7, ->6
    6    10    >   INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $8      
         13        SUB                                              ~9      $8, !1
         14        ASSIGN                                                   !2, ~9
    7    15        INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%25.3f%0A'
         17        MUL                                              ~11     !2, 1000
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                                 
    9    20        ASSIGN                                                   !0, 1000
   10    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !1, $14
   11    25      > JMP                                                      ->30
         26    >   INIT_FCALL                                               'uniqid'
         27        SEND_VAL                                                 ''
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                                 
         30    >   POST_DEC                                         ~17     !0
         31      > JMPNZ                                                    ~17, ->26
   12    32    >   INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $18     
         35        SUB                                              ~19     $18, !1
         36        ASSIGN                                                   !2, ~19
   13    37        INIT_FCALL                                               'printf'
         38        SEND_VAL                                                 '%25.3f%0A'
         39        MUL                                              ~21     !2, 1000
         40        SEND_VAL                                                 ~21
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.84 ms | 1392 KiB | 19 Q