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) { echo "Testing $separator\n"; if(preg_match($separator, $value)) { echo $separator . PHP_EOL; } }
Output for 4.3.11 - 5.6.28, 7.0.0 - 7.1.0
Testing Warning: preg_match(): Empty regular expression in /in/Zj0lC on line 14 Testing Warning: preg_match(): Empty regular expression in /in/Zj0lC on line 14 Testing Warning: preg_match(): Empty regular expression in /in/Zj0lC on line 14 Testing , Warning: preg_match(): No ending delimiter ',' found in /in/Zj0lC on line 14 Testing ; Warning: preg_match(): No ending delimiter ';' found in /in/Zj0lC on line 14 Testing | Warning: preg_match(): No ending delimiter '|' found in /in/Zj0lC on line 14 Testing Warning: preg_match(): Empty regular expression in /in/Zj0lC on line 14
Output for hhvm-3.12.0
Testing Warning: Empty regular expression in /in/Zj0lC on line -1 Testing Warning: Empty regular expression in /in/Zj0lC on line -1 Testing Warning: Empty regular expression in /in/Zj0lC on line -1 Testing , Warning: No ending delimiter ',' found: [,] in /in/Zj0lC on line -1 Testing ; Warning: No ending delimiter ';' found: [;] in /in/Zj0lC on line -1 Testing | Warning: No ending delimiter '|' found: [|] in /in/Zj0lC on line -1 Testing Warning: Empty regular expression in /in/Zj0lC on line -1
Output for hhvm-3.10.0
Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing , Warning: No ending delimiter ',' found: [,] in /in/Zj0lC on line 14 Testing ; Warning: No ending delimiter ';' found: [;] in /in/Zj0lC on line 14 Testing | Warning: No ending delimiter '|' found: [|] in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14
Output for 4.3.0 - 4.3.10
Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14 Testing , Warning: No ending delimiter ',' found in /in/Zj0lC on line 14 Testing ; Warning: No ending delimiter ';' found in /in/Zj0lC on line 14 Testing | Warning: No ending delimiter '|' found in /in/Zj0lC on line 14 Testing Warning: Empty regular expression in /in/Zj0lC on line 14