3v4l.org

run code in 300+ PHP versions simultaneously
<?php function validateEmail($email = "") { if (!$email) { return false; } if (filter_var($email, FILTER_VALIDATE_EMAIL)) { $domain = substr(strrchr($email, "@"), 1); echo $domain; var_dump(checkdnsrr($domain, 'MX')); if (!checkdnsrr($domain, 'MX')) { echo 222; // domain is not valid return false; } else if (preg_match('/successfulmatch\.com$/i', $domain) || preg_match('/88vip\.site$/i', $domain)) { return true; } } else { return false; } } //var_dump(validateEmail("luxury01@gmail.com")); var_dump(validateEmail("penghina304@yahoo.com"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5ur1
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'validateemail'
          2        SEND_VAL                                                 'penghina304%40yahoo.com'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function validateemail:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 48
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 35
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 47) Position 1 = 40, Position 2 = 45
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 47
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H5ur1
function name:  validateEmail
number of ops:  50
compiled vars:  !0 = $email, !1 = $domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      ''
    4     1        BOOL_NOT                                         ~2      !0
          2      > JMPZ                                                     ~2, ->4
    5     3    > > RETURN                                                   <false>
    8     4    >   INIT_FCALL                                               'filter_var'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 274
          7        DO_ICALL                                         $3      
          8      > JMPZ                                                     $3, ->48
    9     9    >   INIT_FCALL                                               'substr'
         10        INIT_FCALL                                               'strrchr'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 '%40'
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $5      
         17        ASSIGN                                                   !1, $5
   10    18        ECHO                                                     !1
   11    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'checkdnsrr'
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 'MX'
         23        DO_ICALL                                         $7      
         24        SEND_VAR                                                 $7
         25        DO_ICALL                                                 
   12    26        INIT_FCALL                                               'checkdnsrr'
         27        SEND_VAR                                                 !1
         28        SEND_VAL                                                 'MX'
         29        DO_ICALL                                         $9      
         30        BOOL_NOT                                         ~10     $9
         31      > JMPZ                                                     ~10, ->35
   13    32    >   ECHO                                                     222
   15    33      > RETURN                                                   <false>
         34*       JMP                                                      ->47
   16    35    >   INIT_FCALL                                               'preg_match'
         36        SEND_VAL                                                 '%2Fsuccessfulmatch%5C.com%24%2Fi'
         37        SEND_VAR                                                 !1
         38        DO_ICALL                                         $11     
         39      > JMPNZ_EX                                         ~12     $11, ->45
         40    >   INIT_FCALL                                               'preg_match'
         41        SEND_VAL                                                 '%2F88vip%5C.site%24%2Fi'
         42        SEND_VAR                                                 !1
         43        DO_ICALL                                         $13     
         44        BOOL                                             ~12     $13
         45    > > JMPZ                                                     ~12, ->47
   17    46    > > RETURN                                                   <true>
         47    > > JMP                                                      ->49
   20    48    > > RETURN                                                   <false>
   22    49    > > RETURN                                                   null

End of function validateemail

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.71 ms | 1419 KiB | 26 Q