3v4l.org

run code in 300+ PHP versions simultaneously
<?php function CreateA6DigitUserID() { $az = array_merge(range('A','Z'), range('a','z')); $one = $az[mt_rand(0,count($az)-1)]; $two = $az[mt_rand(0,count($az)-1)]; $digits = str_pad(mt_rand(0,9999), 4, "0", STR_PAD_LEFT); return $one.$two.$digits; } echo CreateA6DigitUserID();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6MZbo
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'createa6digituserid'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function createa6digituserid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6MZbo
function name:  CreateA6DigitUserID
number of ops:  44
compiled vars:  !0 = $az, !1 = $one, !2 = $two, !3 = $digits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'array_merge'
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 'A'
          3        SEND_VAL                                                 'Z'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        INIT_FCALL                                               'range'
          7        SEND_VAL                                                 'a'
          8        SEND_VAL                                                 'z'
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
    5    13        INIT_FCALL                                               'mt_rand'
         14        SEND_VAL                                                 0
         15        COUNT                                            ~8      !0
         16        SUB                                              ~9      ~8, 1
         17        SEND_VAL                                                 ~9
         18        DO_ICALL                                         $10     
         19        FETCH_DIM_R                                      ~11     !0, $10
         20        ASSIGN                                                   !1, ~11
    6    21        INIT_FCALL                                               'mt_rand'
         22        SEND_VAL                                                 0
         23        COUNT                                            ~13     !0
         24        SUB                                              ~14     ~13, 1
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                         $15     
         27        FETCH_DIM_R                                      ~16     !0, $15
         28        ASSIGN                                                   !2, ~16
    8    29        INIT_FCALL                                               'str_pad'
         30        INIT_FCALL                                               'mt_rand'
         31        SEND_VAL                                                 0
         32        SEND_VAL                                                 9999
         33        DO_ICALL                                         $18     
         34        SEND_VAR                                                 $18
         35        SEND_VAL                                                 4
         36        SEND_VAL                                                 '0'
         37        SEND_VAL                                                 0
         38        DO_ICALL                                         $19     
         39        ASSIGN                                                   !3, $19
   10    40        CONCAT                                           ~21     !1, !2
         41        CONCAT                                           ~22     ~21, !3
         42      > RETURN                                                   ~22
   11    43*     > RETURN                                                   null

End of function createa6digituserid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.47 ms | 1403 KiB | 22 Q