3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emails = array( 'test@example.com', 'test.derp@example.com', 'test+nick@example.com', 'abc."defghi".xyz@example.com', '"abcdefghixyz"@example.com', 'jsmith@[192.168.2.1]', 'jsmith@[IPv6:2001:db8::1]', 'long.but.still.perfectly.valid.email.address@on.even.longer.domain.name.owned.by.some.weird.name.company.which.name.you.cannot.pronounce.com', 'other.email-with-dash@example.com', '"much.more unusual"@example.com', '"very.unusual.@.unusual.com"@example.com', '"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com', 'admin@mailserver1 (local domain name with no TLD)', '#!$%&\'*+-/=?^_`{}|~@example.org', '"()<>[]:,;@\\\"!#$%&\'*+-/=?^_`{}| ~.a"@example.org', '" "@example.org (space between the quotes)', '☃☃☃@example.com (Unicode characters in local part)', '☃☃☃@☃☃☃.com (Unicode characters in domain part)', 'new@domain.pizza' ); foreach ($emails as $email) { echo (filter_var($email, FILTER_VALIDATE_EMAIL)) ? "[+] Email $email is valid\n" : "[-] Email $email is NOT valid\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/qTsVc
function name:  (null)
number of ops:  21
compiled vars:  !0 = $emails, !1 = $email
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   QM_ASSIGN                                                !0
  25     1      > FE_RESET_R                                       $3      !0, ->19
         2    > > FE_FETCH_R                                               $3, !1, ->19
  26     3    >   INIT_FCALL                                               'filter_var'
         4        SEND_VAR                                                 !1
         5        SEND_VAL                                                 274
         6        DO_ICALL                                         $4      
         7      > JMPZ                                                     $4, ->13
  27     8    >   ROPE_INIT                                     3  ~6      '%5B%2B%5D+Email+'
         9        ROPE_ADD                                      1  ~6      ~6, !1
        10        ROPE_END                                      2  ~5      ~6, '+is+valid%0A'
        11        ASSIGN_BW_OR                                  0  ~8      ~5
        12      > JMP                                                      ->17
  28    13    >   ROPE_INIT                                     3  ~10     '%5B-%5D+Email+'
        14        ROPE_ADD                                      1  ~10     ~10, !1
        15        ROPE_END                                      2  ~9      ~10, '+is+NOT+valid%0A'
        16        ASSIGN_BW_OR                                  0  ~8      ~9
        17    >   ASSIGN_OBJ                                               ~8
  25    18      > JMP                                                      ->2
        19    >   FE_FREE                                                  $3
  29    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
12.96 ms | 408 KiB | 7 Q