xref: /PHP-8.0/ext/pcre/tests/bug75355.phpt (revision 84235344)
1--TEST--
2Bug #75355 (preg_quote() does not quote # control character)
3--FILE--
4<?php
5
6var_dump(preg_quote('#'));
7
8var_dump(preg_match('~^(' . preg_quote('hello#world', '~') . ')\z~x', 'hello#world', $m));
9
10var_dump($m[1]);
11?>
12--EXPECT--
13string(2) "\#"
14int(1)
15string(11) "hello#world"
16