3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'johnsnow@ヒキワリ.ナットウ.com'; $email = idn_to_ascii($email); $email = str_replace('xn--', '', $email); $email = idn_to_utf8($email); echo $email . "\n"; $email = 'johnsnow@8x4hqntjic.gckxcpg.com'; $email = idn_to_utf8($email); echo $email . "\n"; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { echo 'valid'; } else { echo 'not valid'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xre8K
function name:  (null)
number of ops:  33
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'johnsnow%40%E3%83%92%E3%82%AD%E3%83%AF%E3%83%AA.%E3%83%8A%E3%83%83%E3%83%88%E3%82%A6.com'
    4     1        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
    5     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 'xn--'
          7        SEND_VAL                                                 ''
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
    6    11        INIT_FCALL_BY_NAME                                       'idn_to_utf8'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $6      
         14        ASSIGN                                                   !0, $6
    7    15        CONCAT                                           ~8      !0, '%0A'
         16        ECHO                                                     ~8
    9    17        ASSIGN                                                   !0, 'johnsnow%408x4hqntjic.gckxcpg.com'
   10    18        INIT_FCALL_BY_NAME                                       'idn_to_utf8'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $10     
         21        ASSIGN                                                   !0, $10
   11    22        CONCAT                                           ~12     !0, '%0A'
         23        ECHO                                                     ~12
   13    24        INIT_FCALL                                               'filter_var'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 274
         27        DO_ICALL                                         $13     
         28      > JMPZ                                                     $13, ->31
   14    29    >   ECHO                                                     'valid'
         30      > JMP                                                      ->32
   16    31    >   ECHO                                                     'not+valid'
   17    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.81 ms | 1396 KiB | 17 Q