3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "testabc"; $regex = "(abc)A"; for ($i = 0; $i < strlen($string); $i++) { var_dump(preg_match($regex, $string, $match, 0, $i)); }
based on I454H
Output for 4.3.3 - 7.2.0
int(0) int(0) int(0) int(0) int(1) int(0) int(0)
Output for 4.3.0 - 4.3.2
Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL Warning: Wrong parameter count for preg_match() in /in/6vNHQ on line 8 NULL