3v4l.org

run code in 300+ PHP versions simultaneously
<?php function maskEmail($email) { $arremail = explode('@',$email); //$email1 = preg_replace('/(?<=.).(?=.*@)/u','*',$arremail[0].'@') $email2 = preg_replace('/(?<=.).(?=.*\.)/u','*',$arremail[1]); echo $email2; } $email = 'facebook@yahoo.com'; $result = maskEmail($email);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZN0Qm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $email, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'facebook%40yahoo.com'
   10     1        INIT_FCALL                                               'maskemail'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !1, $3
          5      > RETURN                                                   1

Function maskemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZN0Qm
function name:  maskEmail
number of ops:  15
compiled vars:  !0 = $email, !1 = $arremail, !2 = $email2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%40'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    6     6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%2F%28%3F%3C%3D.%29.%28%3F%3D.%2A%5C.%29%2Fu'
          8        SEND_VAL                                                 '%2A'
          9        FETCH_DIM_R                                      ~5      !1, 1
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !2, $6
    7    13        ECHO                                                     !2
    8    14      > RETURN                                                   null

End of function maskemail

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.72 ms | 1398 KiB | 18 Q