3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Utils { public static function guid() { return sprintf("%04X%04X-%04X-%04X-%04X-%04X%04X%04X", rand(0, 65535), rand(0, 65535), rand(0, 65535), rand(16384, 20479), rand(32768, 49151), rand(0, 65535), rand(0, 65535), rand(0, 65535)); } } $count = 1000000; $i = 0; $time = microtime(true); while ($i++ < $count) { Utils::guid(); } echo "total: " . (microtime(true) - $time) . "\n"; echo Utils::guid();
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 = 12, Position 2 = 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/luMgY
function name:  (null)
number of ops:  23
compiled vars:  !0 = $count, !1 = $i, !2 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, 1000000
   16     1        ASSIGN                                                   !1, 0
   17     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
   18     6      > JMP                                                      ->9
   19     7    >   INIT_STATIC_METHOD_CALL                                  'Utils', 'guid'
          8        DO_FCALL                                      0          
   18     9    >   POST_INC                                         ~8      !1
         10        IS_SMALLER                                               ~8, !0
         11      > JMPNZ                                                    ~9, ->7
   21    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $10     
         15        SUB                                              ~11     $10, !2
         16        CONCAT                                           ~12     'total%3A+', ~11
         17        CONCAT                                           ~13     ~12, '%0A'
         18        ECHO                                                     ~13
   22    19        INIT_STATIC_METHOD_CALL                                  'Utils', 'guid'
         20        DO_FCALL                                      0  $14     
         21        ECHO                                                     $14
         22      > RETURN                                                   1

Class Utils:
Function guid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/luMgY
function name:  guid
number of ops:  45
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'sprintf'
          1        SEND_VAL                                                 '%2504X%2504X-%2504X-%2504X-%2504X-%2504X%2504X%2504X'
    7     2        INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 65535
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        INIT_FCALL                                               'rand'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 65535
         10        DO_ICALL                                         $1      
         11        SEND_VAR                                                 $1
    8    12        INIT_FCALL                                               'rand'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 65535
         15        DO_ICALL                                         $2      
         16        SEND_VAR                                                 $2
         17        INIT_FCALL                                               'rand'
         18        SEND_VAL                                                 16384
         19        SEND_VAL                                                 20479
         20        DO_ICALL                                         $3      
         21        SEND_VAR                                                 $3
    9    22        INIT_FCALL                                               'rand'
         23        SEND_VAL                                                 32768
         24        SEND_VAL                                                 49151
         25        DO_ICALL                                         $4      
         26        SEND_VAR                                                 $4
         27        INIT_FCALL                                               'rand'
         28        SEND_VAL                                                 0
         29        SEND_VAL                                                 65535
         30        DO_ICALL                                         $5      
         31        SEND_VAR                                                 $5
   10    32        INIT_FCALL                                               'rand'
         33        SEND_VAL                                                 0
         34        SEND_VAL                                                 65535
         35        DO_ICALL                                         $6      
         36        SEND_VAR                                                 $6
         37        INIT_FCALL                                               'rand'
         38        SEND_VAL                                                 0
         39        SEND_VAL                                                 65535
         40        DO_ICALL                                         $7      
         41        SEND_VAR                                                 $7
         42        DO_ICALL                                         $8      
         43      > RETURN                                                   $8
   11    44*     > RETURN                                                   null

End of function guid

End of class Utils.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.7 ms | 1400 KiB | 19 Q