mirror of
https://github.com/php/php-src.git
synced 2025-01-22 03:34:19 +08:00
add test
This commit is contained in:
parent
8ca3826a28
commit
fb696afd10
16
ext/pcre/tests/invalid_utf8.phpt
Normal file
16
ext/pcre/tests/invalid_utf8.phpt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user