1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Commit Graph

125907 Commits

Author SHA1 Message Date
Alex Dowad 68176fdfb1 Use char literals in HTML numeric entity {en,de}coding functions 2021-09-20 11:27:54 +02:00
Alex Dowad 1c905434b9 Add more tests for mb_substr 2021-09-20 11:27:54 +02:00
Alex Dowad f663344f33 Merge branch 'PHP-8.1'
* PHP-8.1:
  Bug #81390: mb_detect_encoding should not prematurely stop processing input
  mb_detect_encoding with only one candidate encoding uses mb_check_encoding
  Optimize text encoding detection for speed (eliminate Unicode property lookups)
2021-09-20 11:27:07 +02:00
Alex Dowad c25a1ef8d0 Bug #81390: mb_detect_encoding should not prematurely stop processing input
As a performance optimization, mb_detect_encoding tries to stop
processing the input string early when there is only one 'candidate'
encoding which the input string is valid in. However, the code which
keeps count of how many candidate encodings have already been rejected
was buggy. This caused mb_detect_encoding to prematurely stop
processing the input when it should have continued.

As a result, it did not notice that in the test case provided by Alec,
the input string was not valid in UTF-16.
2021-09-20 11:21:39 +02:00
Alex Dowad ca33ab59ad mb_detect_encoding with only one candidate encoding uses mb_check_encoding
...Because it's about 5% faster.
2021-09-20 11:20:53 +02:00
Alex Dowad 6acd4f7f3a Optimize text encoding detection for speed (eliminate Unicode property lookups)
...By just testing the input codepoints if they are within a few fixed
ranges instead. This avoids hash lookups in property tables.

From (micro-)benchmarking on my PC, this looks to be a bit less than 4x
faster than the existing code.
2021-09-20 11:20:53 +02:00
Nikita Popov b0989f07af Merge branch 'PHP-8.1'
* PHP-8.1:
  Make setcookie() test more robust against the passage of time
2021-09-20 10:29:24 +02:00
Nikita Popov ad14d6506a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Make setcookie() test more robust against the passage of time
2021-09-20 10:29:13 +02:00
Nikita Popov b4d7387468 Make setcookie() test more robust against the passage of time 2021-09-20 10:28:45 +02:00
Christoph M. Becker e47af326da Don't disable unrelated ext during configure
This is apparently a long-standing copy & paste issue.
2021-09-20 10:26:33 +02:00
Nikita Popov bc19186c7f Merge branch 'PHP-8.1'
* PHP-8.1:
  Use ephemeral ports in socket test
2021-09-20 10:20:10 +02:00
Nikita Popov 624848f118 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Use ephemeral ports in socket test
2021-09-20 10:20:03 +02:00
Nikita Popov 07f6c61c8e Use ephemeral ports in socket test 2021-09-20 10:19:48 +02:00
Nikita Popov e740907ec9 Merge branch 'PHP-8.1'
* PHP-8.1:
  Update Unicode tables to 14.0.0
2021-09-20 09:58:32 +02:00
Colin O'Dell fe36b81d5e Update Unicode tables to 14.0.0
Closes GH-7502.
2021-09-20 09:58:20 +02:00
Anatol Belski 2bf3ac5ed2 Merge branch 'PHP-8.1'
* PHP-8.1:
  NEWS: Add note for bug #78987
  NEWS: Add note for bug #78987
2021-09-19 16:38:17 +02:00
Anatol Belski 066eaa2c58 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  NEWS: Add note for bug #78987
  NEWS: Add note for bug #78987
2021-09-19 16:37:54 +02:00
Anatol Belski 125f305b1d NEWS: Add note for bug #78987
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-19 16:37:33 +02:00
Anatol Belski c129f573bf Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  NEWS: Add note for bug #78987
2021-09-19 16:36:25 +02:00
Anatol Belski 49c9fbbfe2 NEWS: Add note for bug #78987
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-19 16:35:26 +02:00
Anatol Belski 20bff2ff02 Merge branch 'PHP-8.1'
* PHP-8.1:
  fileinfo: Fix test value for s390x on travis-ci
2021-09-19 16:04:53 +02:00
Anatol Belski 1399e08ab9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fileinfo: Fix test value for s390x on travis-ci
2021-09-19 16:04:47 +02:00
Anatol Belski fafdf744fa Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fileinfo: Fix test value for s390x on travis-ci
2021-09-19 16:04:35 +02:00
Anatol Belski 8f75ab0dfc fileinfo: Fix test value for s390x on travis-ci
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-19 16:02:30 +02:00
Anatol Belski d09df2a8f6 Merge branch 'PHP-8.1'
* PHP-8.1:
  fileinfo: Capture more sizes for test as delivered by travis-ci
  fileinfo: Capture more sizes for test as delivered by AppVeyor
2021-09-18 23:18:52 +02:00
Anatol Belski 62bfadc3b8 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fileinfo: Capture more sizes for test as delivered by travis-ci
  fileinfo: Capture more sizes for test as delivered by AppVeyor
2021-09-18 23:18:11 +02:00
Anatol Belski d225770e9e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fileinfo: Capture more sizes for test as delivered by travis-ci
  fileinfo: Capture more sizes for test as delivered by AppVeyor
2021-09-18 23:17:41 +02:00
Anatol Belski 6e0acece68 fileinfo: Capture more sizes for test as delivered by travis-ci
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 23:16:38 +02:00
Anatol Belski e56435c86d fileinfo: Capture more sizes for test as delivered by AppVeyor
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 23:06:57 +02:00
Anatol Belski 429b60416f Merge branch 'PHP-8.1'
* PHP-8.1:
  fileinfo: Adjust value in test
2021-09-18 22:53:27 +02:00
Anatol Belski f88fb1af5f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fileinfo: Adjust value in test
2021-09-18 22:52:52 +02:00
Anatol Belski a4f85a5796 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fileinfo: Adjust value in test
2021-09-18 22:52:30 +02:00
Anatol Belski 0208374ad4 fileinfo: Adjust value in test
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 22:51:08 +02:00
Anatol Belski 0796fec7de Merge branch 'PHP-8.1'
* PHP-8.1:
  fileinfo: Fix test skip condition
2021-09-18 22:39:25 +02:00
Anatol Belski df5d7ec482 fileinfo: Fix test skip condition
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 22:36:04 +02:00
Anatol Belski 0863ab9960 Merge branch 'PHP-8.1'
* PHP-8.1:
  libmagic: Update patch
  fileinfo: Fixed bug #78987 High memory usage during encoding detection
2021-09-18 22:11:25 +02:00
Anatol Belski 31c908af8e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  libmagic: Update patch
  fileinfo: Fixed bug #78987 High memory usage during encoding detection
2021-09-18 22:11:06 +02:00
Anatol Belski 3c40d9bf77 libmagic: Update patch
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 22:04:32 +02:00
Anatol Belski 2a9a521d71 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fileinfo: Fixed bug #78987 High memory usage during encoding detection
2021-09-18 22:02:56 +02:00
Anatol Belski fa96c7e000 fileinfo: Fixed bug #78987 High memory usage during encoding detection
The default buffer size for the encoding detection is set to 64K.

Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 21:00:30 +02:00
George Peter Banyard a51869a202 Fix test by using a format specifier for resource to int conversion
Surprised this worked for so long
2021-09-17 23:05:35 +01:00
Dmitry Stogov 93c5321a6a Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed incorrect assignment of undefined variable
2021-09-17 18:43:23 +03:00
Dmitry Stogov 939b91ad93 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect assignment of undefined variable
2021-09-17 18:43:13 +03:00
Dmitry Stogov 01cfd5e4f9 JIT: Fixed incorrect assignment of undefined variable 2021-09-17 18:35:55 +03:00
Nikita Popov a6615b3419 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix FETCH_OBJ_IS type inference
2021-09-17 17:06:00 +02:00
Nikita Popov bda1ee9511 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix FETCH_OBJ_IS type inference
2021-09-17 17:05:42 +02:00
Nikita Popov a49a309386 Fix FETCH_OBJ_IS type inference
Even if the property is typed, null is still a valid return
value in the BP_VAR_IS case. Other cases will throw instead.
2021-09-17 17:05:25 +02:00
Dmitry Stogov 4e139cfc4c Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: keep register value across call
2021-09-17 18:00:52 +03:00
Dmitry Stogov 703bd89f8f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: keep register value across call
2021-09-17 18:00:42 +03:00
Dmitry Stogov 015cafa38c JIT: keep register value across call 2021-09-17 17:58:24 +03:00