3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.96 ms | 1400 KiB | 19 Q