3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // This is valid, both opening ( and closing ) var_dump(preg_match('~Valid(Regular)Expression~', null) === false); // This is invalid, no opening ( for the closing ) var_dump(preg_match('~InvalidRegular)Expression~', null) === false);
Output for 4.3.11 - 5.6.30, 7.0.0 - 7.2.2
bool(false) Warning: preg_match(): Compilation failed: unmatched parentheses at offset 14 in /in/lhjZr on line 5 bool(true)
Output for hhvm-3.22.0
bool(false) Warning: Compilation failed: unmatched parentheses at offset 14 in /in/lhjZr on line -1 bool(true)
Output for 4.3.0 - 4.3.10, hhvm-3.10.1, hhvm-3.20.2 - 3.21.3
bool(false) Warning: Compilation failed: unmatched parentheses at offset 14 in /in/lhjZr on line 5 bool(true)
Output for hhvm-3.11.1 - 3.19.2
Warning: preg_match() expects parameter 2 to be string, null given in /in/lhjZr on line 3 bool(false) Warning: preg_match() expects parameter 2 to be string, null given in /in/lhjZr on line 5 bool(false)