3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'abdeddf@hotmail.com'; $pattern = '/^[A-Z0-9.-]+\.[A-Z]{2,}\b/i'; function validEmail($email){ // Check the formatting is correct if(filter_var($email, FILTER_VALIDATE_EMAIL) === false){ return FALSE; } // Next check the domain is real. $domain = explode("@", $email, 2); var_dump($domain); return checkdnsrr($domain[1], 'MX'); // returns TRUE/FALSE; } var_dump(validEmail($str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1QB0D
function name:  (null)
number of ops:  9
compiled vars:  !0 = $str, !1 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'abdeddf%40hotmail.com'
    3     1        ASSIGN                                                   !1, '%2F%5E%5BA-Z0-9.-%5D%2B%5C.%5BA-Z%5D%7B2%2C%7D%5Cb%2Fi'
   14     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'validemail'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function validemail:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1QB0D
function name:  validEmail
number of ops:  24
compiled vars:  !0 = $email, !1 = $domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 274
          4        DO_ICALL                                         $2      
          5        TYPE_CHECK                                    4          $2
          6      > JMPZ                                                     ~3, ->8
    7     7    > > RETURN                                                   <false>
   10     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%40'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 2
         12        DO_ICALL                                         $4      
         13        ASSIGN                                                   !1, $4
   11    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   12    17        INIT_FCALL                                               'checkdnsrr'
         18        FETCH_DIM_R                                      ~7      !1, 1
         19        SEND_VAL                                                 ~7
         20        SEND_VAL                                                 'MX'
         21        DO_ICALL                                         $8      
         22      > RETURN                                                   $8
   13    23*     > RETURN                                                   null

End of function validemail

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.22 ms | 1399 KiB | 22 Q