3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = "1234 4567 4568 4569 4560 3333AA 3334BB "; $allowedInputSeparators = array("\r\n", "\n", "\t", ',', ';', '|', ' '); foreach($allowedInputSeparators as $separator) { if(preg_match($separator, $value)) { echo $separator . PHP_EOL; } }
Output for 4.3.11 - 7.1.0
Warning: preg_match(): Empty regular expression in /in/JuF2i on line 13 Warning: preg_match(): Empty regular expression in /in/JuF2i on line 13 Warning: preg_match(): Empty regular expression in /in/JuF2i on line 13 Warning: preg_match(): No ending delimiter ',' found in /in/JuF2i on line 13 Warning: preg_match(): No ending delimiter ';' found in /in/JuF2i on line 13 Warning: preg_match(): No ending delimiter '|' found in /in/JuF2i on line 13 Warning: preg_match(): Empty regular expression in /in/JuF2i on line 13
Output for 4.3.0 - 4.3.10
Warning: Empty regular expression in /in/JuF2i on line 13 Warning: Empty regular expression in /in/JuF2i on line 13 Warning: Empty regular expression in /in/JuF2i on line 13 Warning: No ending delimiter ',' found in /in/JuF2i on line 13 Warning: No ending delimiter ';' found in /in/JuF2i on line 13 Warning: No ending delimiter '|' found in /in/JuF2i on line 13 Warning: Empty regular expression in /in/JuF2i on line 13