diff options
author | Antony Dovgal <tony2001@php.net> | 2006-05-29 20:31:33 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-05-29 20:31:33 +0000 |
commit | 0e639cea578385ec5b13960ad78e121cd61e9c05 (patch) | |
tree | a2dcd4aa0175cf5c2a73ae5ef11e17bea21bec4c | |
parent | d5462c527ab7e0f536f9ea05a27774bc3b2fddc4 (diff) | |
download | php-git-0e639cea578385ec5b13960ad78e121cd61e9c05.tar.gz |
add test
-rw-r--r-- | ext/pcre/tests/invalid_utf8.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/pcre/tests/invalid_utf8.phpt b/ext/pcre/tests/invalid_utf8.phpt new file mode 100644 index 0000000000..df2de2da9b --- /dev/null +++ b/ext/pcre/tests/invalid_utf8.phpt @@ -0,0 +1,16 @@ +--TEST-- +preg_replace() and invalid UTF8 +--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 |