3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $inputEmails = array("@alpari.ru", "@alpari.org", "@forextime.com"); $clientEmail = "daniil.bugreev@alpari.org "; foreach ($inputEmails as $inputEmail) { $emails = preg_quote($inputEmail); } if (preg_match("/^.+(" . implode("|", $emails) . ")$/", $clientEmail)) { echo "match" . PHP_EOL;} else { echo "false" . PHP_EOL; }
based on Ch41k
Output for 5.2.5 - 5.6.28, 7.0.0 - 7.1.0
Warning: implode(): Invalid arguments passed in /in/0QjTb on line 8 match
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid operand type was used: implode() expects a container as one of the arguments in /in/0QjTb on line 8 match
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.4
Warning: implode(): Bad arguments. in /in/0QjTb on line 8 match
Output for 4.3.2 - 4.3.9, 5.0.0 - 5.0.1
Warning: implode(): Bad arguments. in /in/0QjTb on line 8 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0QjTb on line 9 matchPHP_EOL
Output for 4.3.0 - 4.3.1
Warning: implode() [http://www.php.net/function.implode]: Bad arguments. in /in/0QjTb on line 8 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/0QjTb on line 9 matchPHP_EOL