3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Generate the md5 hash of a randomized uniq id $hash = md5(uniqid(rand(), true)); // Select a random number between 1 and 24 (32-8) $n = rand(1, 24); // Generate the token retrieving a part of the hash starting from // the random N number with 8 of lenght $token = substr($hash, $n, 8); echo $token;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ipb3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $hash, !1 = $n, !2 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'md5'
          1        INIT_FCALL                                               'uniqid'
          2        INIT_FCALL                                               'rand'
          3        DO_ICALL                                         $3      
          4        SEND_VAR                                                 $3
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !0, $5
    5    10        INIT_FCALL                                               'rand'
         11        SEND_VAL                                                 1
         12        SEND_VAL                                                 24
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
    8    15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 8
         19        DO_ICALL                                         $9      
         20        ASSIGN                                                   !2, $9
    9    21        ECHO                                                     !2
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.46 ms | 1395 KiB | 21 Q