mirror of
https://github.com/php/php-src.git
synced 2024-11-29 21:04:10 +08:00
(PHP strtr) little smarter
This commit is contained in:
parent
afcd361117
commit
9788129e0e
@ -1120,9 +1120,9 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has
|
||||
}
|
||||
|
||||
found = 0;
|
||||
memcpy(key,str+pos,maxlen);
|
||||
|
||||
for (len = maxlen; len >= minlen; len--) {
|
||||
memcpy(key,str+pos,len);
|
||||
key[ len ]=0;
|
||||
|
||||
if (zend_hash_find(hash,key,len+1,(void**)&trans) == SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user