diff options
Diffstat (limited to 'ext/pcre/tests/bug75355.phpt')
-rw-r--r-- | ext/pcre/tests/bug75355.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug75355.phpt b/ext/pcre/tests/bug75355.phpt new file mode 100644 index 0000000000..d37d781bc1 --- /dev/null +++ b/ext/pcre/tests/bug75355.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #75355 (preg_quote() does not quote # control character) +--FILE-- +<?php + +var_dump(preg_quote('#')); + +var_dump(preg_match('~^(' . preg_quote('hello#world', '~') . ')\z~x', 'hello#world', $m)); + +var_dump($m[1]); +?> +--EXPECT-- +string(2) "\#" +int(1) +string(11) "hello#world" |