Commit Graph

855 Commits

Author SHA1 Message Date
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Dmitry Stogov
6bf3ecf69a Revert "Simplify php_implode(). Fill the resulting string in direct order."
The patch slightly improved performance of string imploding, but reduced speed of integers imploding.

This reverts commit 36d39b7044.
2015-06-23 16:46:41 +03:00
Dmitry Stogov
36d39b7044 Simplify php_implode(). Fill the resulting string in direct order. 2015-06-23 12:57:36 +03:00
Nikita Popov
257054e81d Fix bug #62922
Off by one error...
2015-06-20 14:39:55 +02:00
Xinchen Hui
dc72b70b7e Remove unused var 2015-06-20 10:37:53 +08:00
Xinchen Hui
a7635e82f6 Improve strtr (Fixed a bug which the lenth check doesn't work at all) 2015-06-19 22:59:31 +08:00
Xinchen Hui
20f3416682 Fixed bug #69872 (uninitialised value in strtr with array) 2015-06-18 22:28:29 +08:00
Dmitry Stogov
1c754f0b71 Get rid of more ZVAL_ZVAL() macros 2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Bob Weinand
1a7bf16dd6 Ran wrong tests, fixed bug in impl; simplified 2015-05-26 01:43:56 +02:00
Bob Weinand
bb552908a0 Speed up implod()'ing between 5% and 30% (by time)
Significantly speed up implode()'ing on integers now...
Previously I accidentally committed the first part of the patch in 69b54ba926
2015-05-26 01:12:23 +02:00
Bob Weinand
69b54ba926 Also unreserve T_CLASS 2015-05-25 22:58:30 +02:00
Dmitry Stogov
a464045726 Improve strtr() 2015-05-15 04:03:30 +03:00
Dmitry Stogov
b1d486c7d7 e more efficient zend_hash_*() functions 2015-05-05 16:20:29 +03:00
Nikita Popov
fc264da0e5 Cleanup substr_replace 2015-04-27 18:58:47 +02:00
Anatol Belski
6a1bf93ad9 fix compilation with vc14 2015-04-22 22:25:33 +02:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Xinchen Hui
54e2020ee3 Fixed bug #69144 (strtr not replacing with partly matching replace pairs) 2015-02-28 22:37:46 +08:00
Anatol Belski
52f5cb914e fix incompatible pointer type 2015-02-11 12:03:35 +01:00
Dmitry Stogov
94602028f0 Get rid of old HashTable iteration API 2015-02-10 16:59:34 +03:00
Xinchen Hui
4f5d010269 Fixed segfault introduced in f869bf3829 2015-01-30 22:11:21 +08:00
Xinchen Hui
68f5eb7e71 minor CS fix 2015-01-27 20:35:25 +08:00
Márcio Almada
f869bf3829 fix failure with shared zvals in php_str_replace_in_subject 2015-01-27 07:16:22 -03:00
Márcio Almada
f27e96c2f8 remove unused var, make string.c compilation zero warnings 2015-01-24 00:26:01 -03:00
Reeze Xia
bdfe4d6558 Fix one more leak when wrong $needle type provide of strripos 2015-01-23 17:14:39 +08:00
Reeze Xia
d44b6e58ba Fixed memory leak of strripos() when empty needle or haystack 2015-01-23 16:53:58 +08:00
Xinchen Hui
6ae57df70b Revert "Fixed valgrind reported issue with setlocale"
This reverts commit fa06343d7e.
2015-01-22 16:55:20 +08:00
Xinchen Hui
fa06343d7e Fixed valgrind reported issue with setlocale 2015-01-21 12:03:19 +08:00
Anatol Belski
44cbba100a fix leaking of locale_string in TS build
actually more like an attempt as i see the leaks on travis,
but don't repro on my boxes
2015-01-20 20:52:44 +01:00
Anatol Belski
ea8415114a fix premature freeing of BG(locale_string)
the returned string has to be refcounted
2015-01-20 16:54:04 +01:00
Xinchen Hui
c369a03407 Use zend_string in case we will optimize them 2015-01-20 10:59:28 +08:00
Xinchen Hui
020610ee40 Remove addslashes_str 2015-01-20 10:11:48 +08:00
Xinchen Hui
da7d8f45b2 Optimized php_addslashes 2015-01-19 10:46:39 -05:00
Xinchen Hui
ac9a1a7b0c Optimized trim for what_len == 1 2015-01-19 07:45:30 -05:00
Xinchen Hui
0706032b73 Better fix 2015-01-18 21:38:25 -05:00
Xinchen Hui
f3052c5d2f Fixed bug #68852 (broken strrpos with negative offset) 2015-01-18 10:05:27 -05:00
Nikita Popov
4c115b6b71 Remove string category support in setlocale() 2015-01-17 18:26:45 +01:00
Rasmus Lerdorf
ff6b4ad8c7 FAST ZPP for strtok() and nl2br()
Looking at some template-driven code that calls these
hundreds of times per request
2015-01-17 08:30:40 -08:00
Xinchen Hui
4633a6f5d6 unused var 2015-01-16 12:18:59 +08:00
Xinchen Hui
e49f763482 unused variable 2015-01-16 12:16:44 +08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
8a0bc38535 Merge branch 'zend_sort' of https://github.com/laruence/php-src 2015-01-14 22:15:41 -05:00
Dmitry Stogov
e0155d536f Avoid string reallocation in strtr() 2015-01-14 20:58:41 +03:00
Dmitry Stogov
588e803e85 Ipmrove strtr() by maintaining a set of characters that may start a matched pattern and avoid zend_hash_find() calls for other paterns. 2015-01-14 15:04:04 +03:00
Xinchen Hui
2193de0d18 Faster sorting algo 2015-01-14 18:02:41 +08:00
Dmitry Stogov
ade7a41040 Optimized str_[i]replace to aviod reallocations and repeatable conversions to lowercase 2015-01-13 23:23:50 +03:00
Dmitry Stogov
a7ce679578 Fixed type (case sensetive/insensetive mess) 2015-01-12 22:30:55 +03:00
Dmitry Stogov
c5047d1f11 Use FAST_ZPP in few more frequently used functions 2015-01-12 19:26:12 +03:00
Dmitry Stogov
8d2a7e98db Added special optimized cases when strtr() called with zero or one search/replace pair. 2015-01-12 16:51:59 +03:00