Commit Graph

169 Commits

Author SHA1 Message Date
Nikita Popov
737eb060db Merge branch 'PHP-7.0' into PHP-7.1 2017-01-02 23:39:35 +01:00
Nikita Popov
593b6cd0a8 Optimize get_browser() using prefix and contains checks
Avoid expensive regex compilations by checking for prefix
and contained segments beforehand.
2017-01-02 23:31:27 +01:00
Nikita Popov
b06fb88cf9 Optimize browscap loading and representation
Avoid many string duplications, use interning (browscap-local, of
course), reduce pattern size, use more compact key-value
representation, build result array only on demand.
2017-01-02 23:30:56 +01:00
Christoph M. Becker
3a78530b8a Merge branch 'PHP-7.0' into PHP-7.1 2016-08-27 01:23:36 +02:00
Christoph M. Becker
8fcfacf746 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-27 01:18:10 +02:00
Christoph M. Becker
2139918ea6 Fix #65550: get_browser() incorrectly parsers entries with "+" sign
+ signs in the browscap patterns are meant to be literal characters, so we
have to escape them for the regex matching.
2016-08-27 01:12:01 +02:00
Dmitry Stogov
adc95c5114 Fixed compilation warnings 2016-06-23 12:47:06 +03:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Anatol Belski
0787cd60ed first stone on using the unified globals accessor 2015-07-29 10:36:30 +02:00
Xinchen Hui
550bbf8f46 Fixed bug #69983 (get_browser fails with user agent of null) 2015-07-04 11:05:50 +08:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Xinchen Hui
f23f7dfed0 Use new macros 2015-04-08 14:30:47 +08:00
Stanislav Malyshev
28fdf6a131 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #68021 - get_browser() browser_name_regex
2015-03-22 22:13:21 -07:00
Tjerk Meesters
5b5742c016 Fixed #68021 - get_browser() browser_name_regex
Replaced expression delimiter with tilde (~) and escape where necessary.
2015-03-22 22:12:26 -07:00
Xinchen Hui
4629f8978e Cleanup globals initialization
No needs explicit inititlize zero for globals in no-zts build.
executor_globals should be initialized in zend side.
2015-02-21 11:35:16 +08:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Xinchen Hui
e5d8a14239 Revert "Cleanup globals initialization"
This reverts commit 309e90638d.
2015-02-13 18:25:44 +08:00
Xinchen Hui
da7d94cd73 Merge branch 'PHP-5.6'
Conflicts:
	ext/soap/soap.c
	ext/standard/basic_functions.c
	ext/zlib/zlib.c
2015-02-13 13:28:24 +08:00
Xinchen Hui
309e90638d Cleanup globals initialization 2015-02-13 10:58:35 +08:00
Anatol Belski
fe39840450 fix incompatible pointer type warning 2015-02-03 17:52:17 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
b946348969 enable static tsrm ls cache in ext/standard 2014-10-05 19:49:41 +02:00
Nikita Popov
142a01db92 Fix a couple compile warnings 2014-09-29 20:57:17 +02:00
Anatol Belski
0885e4b1b9 simplify the condition 2014-09-22 09:41:53 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
cb25136f4e fix macros in the 5 basic extensions 2014-08-16 11:37:14 +02:00
Xinchen Hui
922285ec55 Don't use cast (compiler friendly) 2014-05-26 11:05:04 +08:00
Dmitry Stogov
9eb89dddb1 Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros. 2014-05-23 20:37:53 +04:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov
6cf5e51f3e Reduced memory realocations 2014-04-15 22:43:18 +04:00
Dmitry Stogov
f9b26bc39a Cleanup (2-nd round) 2014-04-15 21:56:30 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov
d8099d0468 Changed data layout to allow more efficient operations 2014-04-02 14:34:44 +04:00
Dmitry Stogov
292c01d890 Fixed get_browser() 2014-03-18 00:55:25 +04:00
Dmitry Stogov
40e053e7f3 Use better data structures (incomplete) 2014-02-13 17:54:23 +04:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Anatol Belski
25cae37b13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #64934 Apache2 TS crash with get_browser()
2013-06-06 18:51:32 +02:00
Anatol Belski
1aee7ad636 Fixed bug #64934 Apache2 TS crash with get_browser()
In favour of reading the browscap.ini into a true global var
only once in MINIT, the price for that is to deep copy the
any data from it.
2013-06-06 18:49:04 +02:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00