3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkEmail($email) { $email = trim($email); if (filter_var($email, FILTER_VALIDATE_EMAIL) === false) { var_dump(__LINE__); return false; } list($username, $domain) = explode("@", $email); if (getmxrr($domain, $mxHost)) { var_dump(__LINE__); return true; } else { var_dump(gethostbyname($domain), gethostbyaddr(gethostbyname($domain))); if (stripos(gethostbyaddr(gethostbyname($domain)), $domain) !== false) { var_dump(__LINE__); return true; } var_dump($domain, checkdnsrr($domain, 'MX')); if (checkdnsrr($domain, 'MX')) { var_dump(__LINE__); return true; } // Is domain valid if (filter_var(gethostbyname($domain), FILTER_VALIDATE_IP)) { if (fsockopen($domain, 25, $errno, $errstr, 5)) { var_dump(__LINE__); return true; } } } var_dump(__LINE__); return false; } var_dump(checkEmail('kaidof@yahoo.com')); getmxrr('yahoo.com', $out); print_r($out); $a = checkdnsrr('yahoo.com', 'ANY'); var_dump($a); var_dump(getmxrr("yahoo.com", $var)); var_dump($var); var_dump(checkdnsrr("yahoo.com"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4v774
function name:  (null)
number of ops:  38
compiled vars:  !0 = $out, !1 = $a, !2 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'checkemail'
          2        SEND_VAL                                                 'kaidof%40yahoo.com'
          3        DO_FCALL                                      0  $3      
          4        SEND_VAR                                                 $3
          5        DO_ICALL                                                 
   45     6        INIT_FCALL                                               'getmxrr'
          7        SEND_VAL                                                 'yahoo.com'
          8        SEND_REF                                                 !0
          9        DO_ICALL                                                 
   46    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   48    13        INIT_FCALL                                               'checkdnsrr'
         14        SEND_VAL                                                 'yahoo.com'
         15        SEND_VAL                                                 'ANY'
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
   49    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   50    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'getmxrr'
         23        SEND_VAL                                                 'yahoo.com'
         24        SEND_REF                                                 !2
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
         28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                                 
   51    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'checkdnsrr'
         33        SEND_VAL                                                 'yahoo.com'
         34        DO_ICALL                                         $13     
         35        SEND_VAR                                                 $13
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Function checkemail:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 34
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 63
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 80
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 100
Branch analysis from position: 88
2 jumps found. (Code = 43) Position 1 = 96, Position 2 = 100
Branch analysis from position: 96
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
filename:       /in/4v774
function name:  checkEmail
number of ops:  105
compiled vars:  !0 = $email, !1 = $username, !2 = $domain, !3 = $mxHost, !4 = $errno, !5 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !0, $6
    6     5        INIT_FCALL                                               'filter_var'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 274
          8        DO_ICALL                                         $8      
          9        TYPE_CHECK                                    4          $8
         10      > JMPZ                                                     ~9, ->15
    7    11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 7
         13        DO_ICALL                                                 
    8    14      > RETURN                                                   <false>
   12    15    >   INIT_FCALL                                               'explode'
         16        SEND_VAL                                                 '%40'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        FETCH_LIST_R                                     $12     $11, 0
         20        ASSIGN                                                   !1, $12
         21        FETCH_LIST_R                                     $14     $11, 1
         22        ASSIGN                                                   !2, $14
         23        FREE                                                     $11
   13    24        INIT_FCALL                                               'getmxrr'
         25        SEND_VAR                                                 !2
         26        SEND_REF                                                 !3
         27        DO_ICALL                                         $16     
         28      > JMPZ                                                     $16, ->34
   14    29    >   INIT_FCALL                                               'var_dump'
         30        SEND_VAL                                                 14
         31        DO_ICALL                                                 
   15    32      > RETURN                                                   <true>
         33*       JMP                                                      ->100
   17    34    >   INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'gethostbyname'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                         $18     
         38        SEND_VAR                                                 $18
         39        INIT_FCALL                                               'gethostbyaddr'
         40        INIT_FCALL                                               'gethostbyname'
         41        SEND_VAR                                                 !2
         42        DO_ICALL                                         $19     
         43        SEND_VAR                                                 $19
         44        DO_ICALL                                         $20     
         45        SEND_VAR                                                 $20
         46        DO_ICALL                                                 
   18    47        INIT_FCALL                                               'stripos'
         48        INIT_FCALL                                               'gethostbyaddr'
         49        INIT_FCALL                                               'gethostbyname'
         50        SEND_VAR                                                 !2
         51        DO_ICALL                                         $22     
         52        SEND_VAR                                                 $22
         53        DO_ICALL                                         $23     
         54        SEND_VAR                                                 $23
         55        SEND_VAR                                                 !2
         56        DO_ICALL                                         $24     
         57        TYPE_CHECK                                  1018          $24
         58      > JMPZ                                                     ~25, ->63
   19    59    >   INIT_FCALL                                               'var_dump'
         60        SEND_VAL                                                 19
         61        DO_ICALL                                                 
   20    62      > RETURN                                                   <true>
   24    63    >   INIT_FCALL                                               'var_dump'
         64        SEND_VAR                                                 !2
         65        INIT_FCALL                                               'checkdnsrr'
         66        SEND_VAR                                                 !2
         67        SEND_VAL                                                 'MX'
         68        DO_ICALL                                         $27     
         69        SEND_VAR                                                 $27
         70        DO_ICALL                                                 
   26    71        INIT_FCALL                                               'checkdnsrr'
         72        SEND_VAR                                                 !2
         73        SEND_VAL                                                 'MX'
         74        DO_ICALL                                         $29     
         75      > JMPZ                                                     $29, ->80
   27    76    >   INIT_FCALL                                               'var_dump'
         77        SEND_VAL                                                 27
         78        DO_ICALL                                                 
   28    79      > RETURN                                                   <true>
   32    80    >   INIT_FCALL                                               'filter_var'
         81        INIT_FCALL                                               'gethostbyname'
         82        SEND_VAR                                                 !2
         83        DO_ICALL                                         $31     
         84        SEND_VAR                                                 $31
         85        SEND_VAL                                                 275
         86        DO_ICALL                                         $32     
         87      > JMPZ                                                     $32, ->100
   33    88    >   INIT_FCALL                                               'fsockopen'
         89        SEND_VAR                                                 !2
         90        SEND_VAL                                                 25
         91        SEND_REF                                                 !4
         92        SEND_REF                                                 !5
         93        SEND_VAL                                                 5
         94        DO_ICALL                                         $33     
         95      > JMPZ                                                     $33, ->100
   34    96    >   INIT_FCALL                                               'var_dump'
         97        SEND_VAL                                                 34
         98        DO_ICALL                                                 
   35    99      > RETURN                                                   <true>
   39   100    >   INIT_FCALL                                               'var_dump'
        101        SEND_VAL                                                 39
        102        DO_ICALL                                                 
   40   103      > RETURN                                                   <false>
   41   104*     > RETURN                                                   null

End of function checkemail

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.61 ms | 1411 KiB | 36 Q