3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mails = array( 'a.yamada@yamada.com', 'a.yamada@sub.yamada.com', 'a.yamada@sub.sub.yamada.com', 'a.yamada@sub.sub.sub.yamada.com', 'a.yamada@sub.sub.sub.yamada.com', 'a.yamada@yamada.net', 'a.yamada@sub.yamada.net', 'a.yamada@sub.sub.yamada.net', 'a.yamada@sub.sub.sub.yamada.net', 'a.yamada@sub.sub.sub.yamada.net', ); foreach ($mails as $mail) { if (preg_match('/@([^.]+\.){0,}yamada.com$/', $mail)) { echo "DISCARD\n"; } else { echo "OK\n" } }
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/HbKY2 on line 20
Process exited with code 255.