3v4l.org

run code in 500+ 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:  20
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                                                   'random_int'
         11        SEND_VAL                                                     0
         12        SEND_VAL                                                     100
         13        DO_ICALL                                             $5      
         14        ROPE_INIT                                         3  ~8      !1
         15        ROPE_ADD                                          1  ~8      ~8, !2
         16        CAST                                              4  ~6      $5
         17        ROPE_END                                          2  ~7      ~8, ~6
         18      > RETURN                                                       ~7
    6    19*     > RETURN                                                       null

End of function random_username

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.31 ms | 1470 KiB | 18 Q