Commit graph

141284 commits

Author SHA1 Message Date
George Wang
78370689b8 Merge branch 'PHP-8.4' 2025-04-27 11:53:33 -04:00
George Wang
39a8e5e041 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 11:53:14 -04:00
George Wang
58e5d0c240 Update max size of request headers from 65535 to 256K 2025-04-27 11:52:51 -04:00
George Wang
7cc7ae9d24 Merge branch 'PHP-8.4' 2025-04-27 11:47:52 -04:00
George Wang
e961488d98 Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:47:35 -04:00
George Wang
c9aba7c7ca Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 11:46:27 -04:00
George Wang
e4f2e4a99a Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:20:32 -04:00
Niels Dossche
5f97728780
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix IntlDateFormatter::parseToCalendar() reference type system breaks
  datefmt_parse/datefmt_localtime references type system fixes
  Fix GH-18438: Handling of empty data and errors in ZipArchive::addPattern
2025-04-27 11:33:33 +02:00
Niels Dossche
173dccb646
Fix IntlDateFormatter::parseToCalendar() reference type system breaks
Closes GH-18440.
2025-04-27 11:33:21 +02:00
Niels Dossche
d00adca199
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  datefmt_parse/datefmt_localtime references type system fixes
  Fix GH-18438: Handling of empty data and errors in ZipArchive::addPattern
2025-04-27 11:32:57 +02:00
Niels Dossche
2beec54e47
datefmt_parse/datefmt_localtime references type system fixes
Closes GH-18441.
2025-04-27 11:31:35 +02:00
Niels Dossche
2eb3100dca
Fix GH-18438: Handling of empty data and errors in ZipArchive::addPattern
There is a ZPP arginfo violation because the empty return or error
return is not always properly handled.
And there is also a memory leak if creating the regular expression
instance fails.

Closes GH-18438.
2025-04-27 11:30:57 +02:00
Niels Dossche
1ec9041bf8
Fix reference handling in cancel callback (#18439)
Broke in 8765e9f5e7
2025-04-27 11:27:18 +02:00
Gina Peter Banyard
c919ab4bdf
[skip ci] Update UPGRADING regarding libxml signature change 2025-04-26 13:59:38 +01:00
Gina Peter Banyard
3932d9b660 ext/libxml: Get rid of useless php_libxml_func_handler abstraction 2025-04-26 13:57:17 +01:00
Gina Peter Banyard
dc036016a3 ext/libxml: Minor code nits 2025-04-26 13:57:17 +01:00
Gina Peter Banyard
d1917c918e ext/libxml: libxml_set_external_entity_loader() always returns true 2025-04-26 13:57:17 +01:00
Gina Peter Banyard
c5aa03c8b9 ext/libxml: Use bool type instead of int type 2025-04-26 13:57:17 +01:00
Gina Peter Banyard
1f1cd5c4bc ext/libxml: Add some const qualifiers 2025-04-26 13:57:17 +01:00
Gina Peter Banyard
e59c7f887b ext/libxml: Reduce scope of variables 2025-04-26 13:57:17 +01:00
Niels Dossche
a7cc447b28
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18431: Registering ZIP progress callback twice doesn't work
2025-04-26 14:27:15 +02:00
Niels Dossche
5b8db66227
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18431: Registering ZIP progress callback twice doesn't work
2025-04-26 14:23:54 +02:00
Niels Dossche
b066ac0b23
Fix GH-18431: Registering ZIP progress callback twice doesn't work
Libzip already cleans up the previous callback, so when that means:
1. The callback zval being already copied over the previous one causes
   libzip to clean up the new callback object. This is the root cause.
2. Our own code to clean the old callback is redundant.

Closes GH-18432.
2025-04-26 14:21:03 +02:00
Niels Dossche
d36b02927f
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18400: http_build_query type error is inaccurate
2025-04-26 14:17:35 +02:00
Niels Dossche
7a2bef02c0
Fix GH-18400: http_build_query type error is inaccurate
Objects are also accepted still, so the error message is misleading.

Closes GH-18434.
2025-04-26 14:17:24 +02:00
Niels Dossche
4f10973853
Remove always-false intern checks (#18433) 2025-04-26 14:11:37 +02:00
Tim Düsterhus
61d15870aa
random: Mark mt_getrandmax() as @compile-time-eval (#18425) 2025-04-25 22:57:04 +02:00
Niels Dossche
e3433fdaef
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18421: Integer overflow with large numbers in LimitIterator
2025-04-25 20:06:24 +02:00
Niels Dossche
4ff41cfb4b
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18421: Integer overflow with large numbers in LimitIterator
2025-04-25 20:06:18 +02:00
Niels Dossche
a91d913901
Fix GH-18421: Integer overflow with large numbers in LimitIterator
Since we already know that `pos < intern->u.limit.offset` at this point,
we can reverse the expression.

Closes GH-18424.
2025-04-25 20:05:55 +02:00
Derick Rethans
0029d2b08b Turn off font ligatures in code in documentation 2025-04-25 10:30:43 +01:00
Derick Rethans
681ef77734 Convert https://qa.php.net/running-tests.php 2025-04-25 10:09:52 +01:00
Derick Rethans
eb048ce0c6 Add samples from original QA site 2025-04-25 10:09:52 +01:00
Derick Rethans
ec288b1b07 Convert https://qa.php.net/write-test.php and https://qa.php.net/phpt_details.php 2025-04-25 10:09:52 +01:00
Saki Takamachi
6c09c167ef
removed <mmintrin.h> (#18414) 2025-04-25 08:26:51 +09:00
Niels Dossche
6c0578d31c
Improve performance of urldecode() and rawurldecode()
There are two hot spots on my machines:
1. We copy the string because the internal PHP API works in-place.
2. The conversion of hex characters is slow due to going through the C
   locale handling.

This patch resolves the first hot spots by introducing 2 new internal
APIs that avoid the redundant copy and allocate an empty string upfront.
The second hotspot is resolved by having a specialised htoi handler.

For the following benchmark:
```php
$encoded = "Hello%20World%21+This%20is%20a%20test%3A%20%40%23%24%25%5E%26*%28%29";
for ($i=0;$i<2000000;$i++) {
  rawurldecode($encoded);
  urldecode($encoded);
}
```

On an i7-4790:
```
Benchmark 1: ./sapi/cli/php x.php
  Time (mean ± σ):     364.8 ms ±   3.7 ms    [User: 359.9 ms, System: 3.3 ms]
  Range (min … max):   359.9 ms … 372.0 ms    10 runs

Benchmark 2: ./sapi/cli/php_old x.php
  Time (mean ± σ):     565.5 ms ±   4.9 ms    [User: 561.8 ms, System: 2.5 ms]
  Range (min … max):   560.7 ms … 578.2 ms    10 runs

Summary
  ./sapi/cli/php x.php ran
    1.55 ± 0.02 times faster than ./sapi/cli/php_old x.php
```

On an i7-1185G7:
```
Benchmark 1: ./sapi/cli/php x.php
  Time (mean ± σ):     708.8 ms ±   6.1 ms    [User: 701.4 ms, System: 6.3 ms]
  Range (min … max):   701.9 ms … 722.3 ms    10 runs

Benchmark 2: ./sapi/cli/php_old x.php
  Time (mean ± σ):      1.311 s ±  0.019 s    [User: 1.300 s, System: 0.008 s]
  Range (min … max):    1.281 s …  1.348 s    10 runs

Summary
  ./sapi/cli/php x.php ran
    1.85 ± 0.03 times faster than ./sapi/cli/php_old x.php
```

Closes GH-18378.
2025-04-24 22:14:55 +02:00
Niels Dossche
c0da1bc44d
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-17403: Potential deadlock when putenv fails
2025-04-24 20:22:35 +02:00
Niels Dossche
c6ed104e91
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17403: Potential deadlock when putenv fails
2025-04-24 20:22:30 +02:00
Niels Dossche
32e091260a
Fix GH-17403: Potential deadlock when putenv fails
Closes GH-18368.
2025-04-24 20:22:04 +02:00
Sergey Panteleev
090b1cf229
[ci skip] Update PHP Release Process (#18342) 2025-04-24 18:53:11 +03:00
Ilija Tovilo
9306c9584b
Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:28:47 +02:00
Ilija Tovilo
303610154b
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:32 +02:00
Ilija Tovilo
438f07c9f7
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:25 +02:00
Ilija Tovilo
86ac21c3cd
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:16 +02:00
Ilija Tovilo
b5081339e9
[skip ci] Increase tolerance for cve-2014-3538 tests
These regularly fail with "Failed, time=1.5x".
2025-04-24 11:26:17 +02:00
Niels Dossche
4f3244351d
Merge branch 'PHP-8.4'
* PHP-8.4:
  Revert "Port XML_GetCurrentByteIndex to public APIs"
2025-04-23 22:10:13 +02:00
Niels Dossche
40894bcc49
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Revert "Port XML_GetCurrentByteIndex to public APIs"
2025-04-23 22:08:10 +02:00
Niels Dossche
54e662c6f5
Revert "Port XML_GetCurrentByteIndex to public APIs"
This reverts commit 8dc799aac7.

Originally, this was going to be deprecated in libxml2 2.14, but this
didn't end up happening in the end, and the replacement function that we
used got deprecated instead. So fix the deprecation warning by reverting
to the original code.

Closes GH-18407.
2025-04-23 22:07:26 +02:00
Tim Düsterhus
7831f65f83
fileinfo: Stop calling finfo_close() in tests (#18405)
This function is a noop and will be proposed for deprecation. This patch
removes the useless calls.
2025-04-23 18:57:32 +02:00
Derick Rethans
0e1bbf9259
Add PHP 8.4 to the list 2025-04-23 17:44:17 +01:00