diff options
Diffstat (limited to 'ext/pcre/tests/bug74183.phpt')
-rw-r--r-- | ext/pcre/tests/bug74183.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug74183.phpt b/ext/pcre/tests/bug74183.phpt new file mode 100644 index 0000000000..a230145961 --- /dev/null +++ b/ext/pcre/tests/bug74183.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #74183 - preg_last_error not returning error code after error +--FILE-- +<?php + +$sRegex = "/([A-Z]|[a-z]|[0-9]| |Ñ|ñ|!|"|%|&|'|´|-|:|;|>|=|<|@|_|,|\{|\}|`|~|á|é|í|ó|ú|Á|É|Í|Ó|Ú|ü|Ü){1,300}/"; +$sTest = "Hello world"; + +var_dump(preg_match($sRegex, $sTest)); +var_dump(preg_last_error() === \PREG_INTERNAL_ERROR); +?> +--EXPECTF-- +Warning: preg_match(): Compilation failed: regular expression is too large at offset %s in %s on line %s +bool(false) +bool(true)
\ No newline at end of file |