3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GUID() { if (function_exists('com_create_guid') === true) { return trim(com_create_guid(), '{}'); } return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); } echo GUID();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H44va
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'guid'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function guid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H44va
function name:  GUID
number of ops:  57
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'com_create_guid'
          2        DO_ICALL                                         $0      
          3        TYPE_CHECK                                    8          $0
          4      > JMPZ                                                     ~1, ->12
    6     5    >   INIT_FCALL                                               'trim'
          6        INIT_FCALL_BY_NAME                                       'com_create_guid'
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 '%7B%7D'
         10        DO_ICALL                                         $3      
         11      > RETURN                                                   $3
    9    12    >   INIT_FCALL                                               'sprintf'
         13        SEND_VAL                                                 '%2504X%2504X-%2504X-%2504X-%2504X-%2504X%2504X%2504X'
         14        INIT_FCALL                                               'mt_rand'
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 65535
         17        DO_ICALL                                         $4      
         18        SEND_VAR                                                 $4
         19        INIT_FCALL                                               'mt_rand'
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 65535
         22        DO_ICALL                                         $5      
         23        SEND_VAR                                                 $5
         24        INIT_FCALL                                               'mt_rand'
         25        SEND_VAL                                                 0
         26        SEND_VAL                                                 65535
         27        DO_ICALL                                         $6      
         28        SEND_VAR                                                 $6
         29        INIT_FCALL                                               'mt_rand'
         30        SEND_VAL                                                 16384
         31        SEND_VAL                                                 20479
         32        DO_ICALL                                         $7      
         33        SEND_VAR                                                 $7
         34        INIT_FCALL                                               'mt_rand'
         35        SEND_VAL                                                 32768
         36        SEND_VAL                                                 49151
         37        DO_ICALL                                         $8      
         38        SEND_VAR                                                 $8
         39        INIT_FCALL                                               'mt_rand'
         40        SEND_VAL                                                 0
         41        SEND_VAL                                                 65535
         42        DO_ICALL                                         $9      
         43        SEND_VAR                                                 $9
         44        INIT_FCALL                                               'mt_rand'
         45        SEND_VAL                                                 0
         46        SEND_VAL                                                 65535
         47        DO_ICALL                                         $10     
         48        SEND_VAR                                                 $10
         49        INIT_FCALL                                               'mt_rand'
         50        SEND_VAL                                                 0
         51        SEND_VAL                                                 65535
         52        DO_ICALL                                         $11     
         53        SEND_VAR                                                 $11
         54        DO_ICALL                                         $12     
         55      > RETURN                                                   $12
   10    56*     > RETURN                                                   null

End of function guid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1403 KiB | 22 Q