3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'geradolson5656@gmail.com'; if (checkEmailAndDomain($email)) { echo 'Yes'; } else { echo 'No'; } function checkEmailAndDomain($email) { $exp = "/^(.*)@(.*)$/"; preg_match($exp, $email, $matches); if (!empty($matches[1]) and (!filter_var($email, FILTER_VALIDATE_EMAIL))) return (false); return (checkdnsrr(idn_to_ascii($matches[2]), 'MX')); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dl3dE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'geradolson5656%40gmail.com'
    5     1        INIT_FCALL_BY_NAME                                       'checkEmailAndDomain'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->7
    6     5    >   ECHO                                                     'Yes'
          6      > JMP                                                      ->8
    8     7    >   ECHO                                                     'No'
   20     8    > > RETURN                                                   1

Function checkemailanddomain:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Dl3dE
function name:  checkEmailAndDomain
number of ops:  29
compiled vars:  !0 = $email, !1 = $exp, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ASSIGN                                                   !1, '%2F%5E%28.%2A%29%40%28.%2A%29%24%2F'
   14     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   16     7        ISSET_ISEMPTY_DIM_OBJ                         1  ~5      !2, 1
          8        BOOL_NOT                                         ~6      ~5
          9      > JMPZ_EX                                          ~6      ~6, ->16
         10    >   INIT_FCALL                                               'filter_var'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 274
         13        DO_ICALL                                         $7      
         14        BOOL_NOT                                         ~8      $7
         15        BOOL                                             ~6      ~8
         16    > > JMPZ                                                     ~6, ->18
   17    17    > > RETURN                                                   <false>
   19    18    >   INIT_FCALL                                               'checkdnsrr'
         19        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
         20        CHECK_FUNC_ARG                                           
         21        FETCH_DIM_FUNC_ARG                               $9      !2, 2
         22        SEND_FUNC_ARG                                            $9
         23        DO_FCALL                                      0  $10     
         24        SEND_VAR                                                 $10
         25        SEND_VAL                                                 'MX'
         26        DO_ICALL                                         $11     
         27      > RETURN                                                   $11
   20    28*     > RETURN                                                   null

End of function checkemailanddomain

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.9 ms | 1400 KiB | 19 Q