3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random_username($string) { sscanf(strtolower($string), '%s %2s', $first, $second); return sprintf('%s%s%d', $first, $second, random_int(0, 100)); } var_export(random_username("Mike Test"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gOnro
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_export'
          1        INIT_FCALL                                               'random_username'
          2        SEND_VAL                                                 'Mike+Test'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function random_username:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gOnro
function name:  random_username
number of ops:  22
compiled vars:  !0 = $string, !1 = $first, !2 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'sscanf'
          2        INIT_FCALL                                               'strtolower'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        SEND_VAL                                                 '%25s+%252s'
          7        SEND_REF                                                 !1
          8        SEND_REF                                                 !2
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'sprintf'
         11        SEND_VAL                                                 '%25s%25s%25d'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        INIT_FCALL                                               'random_int'
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 100
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                         $6      
         20      > RETURN                                                   $6
    6    21*     > RETURN                                                   null

End of function random_username

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.78 ms | 1005 KiB | 19 Q