3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'http://ヒキワリ.ナットウ.ニホン'; $email = idn_to_ascii($email); echo $email . "\n"; $dictionary = array('aero', 'arpa', 'asia', 'biz', 'cat', 'com', 'coop', 'edu', 'gov', 'info', 'int', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'pro', 'tel', 'travel'); $expression = '^[a-z0-9_-]+(?:[a-z0-9._%+-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[A-Z]{2}|' . implode('|', $dictionary) . ')$'; echo mb_eregi($expression, $email) !== false; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AnIMJ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $email, !1 = $dictionary, !2 = $expression
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2F%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'
    4     1        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !0, $4
    5     5        CONCAT                                           ~6      !0, '%0A'
          6        ECHO                                                     ~6
    7     7        ASSIGN                                                   !1, <array>
    8     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%7C'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        CONCAT                                           ~9      '%5E%5Ba-z0-9_-%5D%2B%28%3F%3A%5Ba-z0-9._%25%2B-%5D%2B%29%2A%40%28%3F%3A%5Ba-z0-9%5D%28%3F%3A%5Ba-z0-9-%5D%2A%5Ba-z0-9%5D%29%3F%5C.%29%2B%28%3F%3A%5BA-Z%5D%7B2%7D%7C', $8
         13        CONCAT                                           ~10     ~9, '%29%24'
         14        ASSIGN                                                   !2, ~10
   10    15        INIT_FCALL                                               'mb_eregi'
         16        SEND_VAR                                                 !2
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $12     
         19        TYPE_CHECK                                  1018  ~13     $12
         20        ECHO                                                     ~13
   12    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.12 ms | 1395 KiB | 17 Q