3v4l.org

run code in 500+ PHP versions simultaneously
<?php function random_username($string) { return preg_replace('/(\S+) (\S{2}).*/', '$1$2', strtolower($string)) . 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/vqjq0
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     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/vqjq0
function name:  random_username
number of ops:  13
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_FCALL                                                   'strtolower'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $1      
          4        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%28%5CS%2B%29+%28%5CS%7B2%7D%29.%2A%2F', '%241%242'
          5        OP_DATA                                                      $1
          6        INIT_FCALL                                                   'random_int'
          7        SEND_VAL                                                     0
          8        SEND_VAL                                                     100
          9        DO_ICALL                                             $3      
         10        CONCAT                                               ~4      ~2, $3
         11      > RETURN                                                       ~4
    5    12*     > RETURN                                                       null

End of function random_username

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.43 ms | 1456 KiB | 17 Q