3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$email = 'johnsnow@ヒキワリ.ナットウ.com'; $email = 'ヒキワリ.ナットウ.ニホン'; $email = idn_to_ascii($email); $email = str_replace('xn--', '', $email); $email = str_replace('@-', '@', $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 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FoBj8
function name:  (null)
number of ops:  28
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%E3%83%92%E3%82%AD%E3%83%AF%E3%83%AA.%E3%83%8A%E3%83%83%E3%83%88%E3%82%A6.%E3%83%8B%E3%83%9B%E3%83%B3'
    5     1        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
    6     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 'xn--'
          7        SEND_VAL                                                 ''
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
    7    11        INIT_FCALL                                               'str_replace'
         12        SEND_VAL                                                 '%40-'
         13        SEND_VAL                                                 '%40'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $6      
         16        ASSIGN                                                   !0, $6
    9    17        CONCAT                                           ~8      !0, '%0A'
         18        ECHO                                                     ~8
   11    19        INIT_FCALL                                               'filter_var'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 274
         22        DO_ICALL                                         $9      
         23      > JMPZ                                                     $9, ->26
   12    24    >   ECHO                                                     'valid'
         25      > JMP                                                      ->27
   14    26    >   ECHO                                                     'not+valid'
   15    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.42 ms | 1395 KiB | 20 Q