php-src/ext/pcre/tests/invalid_utf8.phpt
2008-11-03 13:07:28 +00:00

23 lines
367 B
PHP

--TEST--
preg_replace() and invalid UTF8
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
die('skip no utf8 support in PCRE library');
}
?>
--FILE--
<?php
$string = urldecode("search%e4");
$result = preg_replace("#(&\#x*)([0-9A-F]+);*#iu","$1$2;",$string);
var_dump($result);
var_dump(preg_last_error());
echo "Done\n";
?>
--EXPECT--
NULL
int(4)
Done