php-src/ext/pcre/tests/bug26927.phpt
Antony Dovgal df68f888ea leaks--
fix test
2006-10-03 21:37:02 +00:00

15 lines
261 B
PHP

--TEST--
Bug #26927 (preg_quote() does not escape \0)
--FILE--
<?php
$str = "a\000b";
$str_quoted = preg_quote($str);
var_dump(preg_match("!{$str_quoted}!", $str), $str_quoted);
?>
--EXPECT--
int(1)
string(6) "a\000b"
--UEXPECT--
int(1)
unicode(6) "a\000b"