From: pz9042 at 163 dot com
Operating system: win
PHP version: 5.4.32
Package: PECL
Bug Type: Bug
Bug description:preg彿°å¤çutf8䏿
Description:
------------
å¨ä¸ç¨preg_matchæè
preg_match_all
æè
preg_replaceå¤ç䏿®µutf8ç¼ç
ç䏿æ¶ï¼è°·ææµè§å¨æ¥ä¸localhostçè¿æ¥ä¸æï¼ç«çå跳转å°www.localhost.com页é¢ï¼ç»ææ¥ï¼è®²å符转æansiç¼ç
ï¼å°±ä¸ä¼åºç°é®é¢ï¼ä¸å¨winä¸cliä¸ï¼ä¹ä¸ä¼é误ï¼åªæç¨æµè§å¨ä¼åºç°æ¤é®é¢ï¼webæå¡å¨æ¯apacheï¼ä¸ç®¡æ¯æµè§å¨è¿æ¯cliï¼phpçé
ç½®æä»¶æ¯åä¸ä¸ª
Test script:
---------------
header("Content-type: text/html; charset=utf-8");
ini_set('pcre.backtrack_limit', '-1');
ini_set('pcre.recursion_limit', '-1');
$source =
'<p>ç¨æ·æ³¨åé¡»å
·ææ³å®çç¸åºæå©è½ååè¡ä¸ºè½åçèªç¶äººãæ³äººæå
¶ä»ç»ç»ï¼è½å¤ç¬ç«æ¿æ
æ³å¾è´£ä»»ãæ¨å®ææ³¨åç¨åºæå
¶ä»åè²ç½å¹³å°åæçæ¹å¼å®é
ä½¿ç¨æ¬å¹³å°æå¡æ¶ï¼å³è§ä¸ºæ¨ç¡®è®¤èªå·±å
·å¤ä¸»ä½èµæ
¼ï¼è½å¤ç¬ç«æ¿æ
æ³å¾è´£ä»»ãè¥å æ¨ä¸å
·å¤ä¸»ä½èµæ
¼ï¼è导è´çä¸ååæï¼ç±æ¨åæ¨ççæ¤äººèªè¡æ¿æ
ã</p>';
preg_match(
"/([^a-zA-Z0-9_]{1,1})+(copy|fputs|fopen|file_put_contents|fwrite|eval|phpinfo)+/is"
,$source ,$match );
print_r($match);exit;
--
Edit bug report at https://bugs.php.net/bug.php?id=67986&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=67986&r=trysnapshot54
Try a snapshot (PHP 5.5):
https://bugs.php.net/fix.php?id=67986&r=trysnapshot55
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=67986&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67986&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67986&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67986&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67986&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67986&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67986&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67986&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=67986&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=67986&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67986&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67986&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67986&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67986&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67986&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67986&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67986&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67986&r=mysqlcfg
--
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php