3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uuid = sprintf('%04x%04x%04x%04x%04x%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one // for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); $packedUuid = pack('H*', $uuid); echo $uuid . PHP_EOL; echo sizeof($uuid) . PHP_EOL; echo $packedUuid . PHP_EOL; echo sizeof($packedUuid) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VqCKq
function name:  (null)
number of ops:  62
compiled vars:  !0 = $uuid, !1 = $packedUuid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'sprintf'
          1        SEND_VAL                                                 '%2504x%2504x%2504x%2504x%2504x%2504x%2504x%2504x'
    5     2        INIT_FCALL                                               'mt_rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 65535
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        INIT_FCALL                                               'mt_rand'
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 65535
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
    7    12        INIT_FCALL                                               'mt_rand'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 65535
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
   10    17        INIT_FCALL                                               'mt_rand'
         18        SEND_VAL                                                 0
         19        SEND_VAL                                                 4095
         20        DO_ICALL                                         $5      
         21        BW_OR                                            ~6      $5, 16384
         22        SEND_VAL                                                 ~6
   15    23        INIT_FCALL                                               'mt_rand'
         24        SEND_VAL                                                 0
         25        SEND_VAL                                                 16383
         26        DO_ICALL                                         $7      
         27        BW_OR                                            ~8      $7, 32768
         28        SEND_VAL                                                 ~8
   17    29        INIT_FCALL                                               'mt_rand'
         30        SEND_VAL                                                 0
         31        SEND_VAL                                                 65535
         32        DO_ICALL                                         $9      
         33        SEND_VAR                                                 $9
         34        INIT_FCALL                                               'mt_rand'
         35        SEND_VAL                                                 0
         36        SEND_VAL                                                 65535
         37        DO_ICALL                                         $10     
         38        SEND_VAR                                                 $10
         39        INIT_FCALL                                               'mt_rand'
         40        SEND_VAL                                                 0
         41        SEND_VAL                                                 65535
         42        DO_ICALL                                         $11     
         43        SEND_VAR                                                 $11
         44        DO_ICALL                                         $12     
    3    45        ASSIGN                                                   !0, $12
   20    46        INIT_FCALL                                               'pack'
         47        SEND_VAL                                                 'H%2A'
         48        SEND_VAR                                                 !0
         49        DO_ICALL                                         $14     
         50        ASSIGN                                                   !1, $14
   22    51        CONCAT                                           ~16     !0, '%0A'
         52        ECHO                                                     ~16
   23    53        COUNT                                            ~17     !0
         54        CONCAT                                           ~18     ~17, '%0A'
         55        ECHO                                                     ~18
   24    56        CONCAT                                           ~19     !1, '%0A'
         57        ECHO                                                     ~19
   25    58        COUNT                                            ~20     !1
         59        CONCAT                                           ~21     ~20, '%0A'
         60        ECHO                                                     ~21
         61      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.72 ms | 1400 KiB | 19 Q