Skip to content

Commit 10dd8b5

Browse files
authored
Merge branch 'php:master' into parameter-doccomments
2 parents f7985cb + bd042a5 commit 10dd8b5

214 files changed

Lines changed: 5002 additions & 2596 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ body:
2626
attributes:
2727
label: PHP Version
2828
description: |
29-
Please run PHP with the `-v` flag (e.g. `php -v`, `php8.3 -v`, `php-fpm -v` or similar) and provide the full output of that command. If executing that command is not possible, please provide the full version number as given in PHPInfo.
29+
Please run PHP with the `-v` flag (e.g. `php -v`, `php8.5 -v`, `php-fpm -v` or similar) and provide the full output of that command. If executing that command is not possible, please provide the full version number as given in PHPInfo.
3030
3131
Please make sure that the used PHP version [is a supported version](https://www.php.net/supported-versions.php).
3232
placeholder: |
33-
PHP 8.3.19 (cli) (built: Mar 13 2025 17:44:40) (NTS)
33+
PHP 8.5.2 (cli) (built: Jan 21 2026 17:35:28) (NTS)
3434
Copyright (c) The PHP Group
35-
Zend Engine v4.3.19, Copyright (c) Zend Technologies
36-
with Zend OPcache v8.3.19, Copyright (c), by Zend Technologies
35+
Built by Ubuntu
36+
Zend Engine v4.5.2, Copyright (c) Zend Technologies
37+
with Zend OPcache v8.5.2, Copyright (c), by Zend Technologies
3738
render: plain
3839
validations:
3940
required: true

.github/matrix.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re
8080
$jobs['COMMUNITY']['matrix'] = version_compare($php_version, '8.4', '>=')
8181
? ['type' => ['asan', 'verify_type_inference']]
8282
: ['type' => ['asan']];
83-
$jobs['COMMUNITY']['config']['symfony_version'] = version_compare($php_version, '8.4', '>=') ? '8.1' : '7.4';
83+
$jobs['COMMUNITY']['config']['symfony_version'] = match (true) {
84+
version_compare($php_version, '8.3', '<=') => '7.4',
85+
default => '',
86+
};
87+
$jobs['COMMUNITY']['config']['laravel_version'] = match (true) {
88+
version_compare($php_version, '8.2', '<=') => '12.x',
89+
default => '',
90+
};
8491
}
8592
if (($all_jobs && $ref === 'master') || $test_coverage) {
8693
$jobs['COVERAGE'] = true;

.github/workflows/test-suite.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ jobs:
506506
- name: Test Laravel
507507
if: ${{ !cancelled() }}
508508
run: |
509-
git clone https://github.com/laravel/framework.git --depth=1
509+
branch=${{ fromJson(inputs.branch).jobs.COMMUNITY.config.laravel_version }}
510+
git clone https://github.com/laravel/framework.git --depth=1 ${branch:+--branch="$branch"}
510511
cd framework
511512
git rev-parse HEAD
512513
php /usr/bin/composer install --no-progress --ignore-platform-req=php+
@@ -551,7 +552,8 @@ jobs:
551552
- name: Test Symfony
552553
if: ${{ !cancelled() }}
553554
run: |
554-
git clone https://github.com/symfony/symfony.git --depth=1 --branch="${{ fromJson(inputs.branch).jobs.COMMUNITY.config.symfony_version }}"
555+
branch=${{ fromJson(inputs.branch).jobs.COMMUNITY.config.symfony_version }}
556+
git clone https://github.com/symfony/symfony.git --depth=1 ${branch:+--branch="$branch"}
555557
cd symfony
556558
git rev-parse HEAD
557559
php /usr/bin/composer install --no-progress --ignore-platform-req=php+

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ had several contributions accepted, commit privileges are often quickly granted.
2727
* [Git commit rules](#git-commit-rules)
2828
* [Copyright and license headers](#copyright-and-license-headers)
2929
* [NEWS file](#news)
30+
* [LLM usage in GitHub comments](#llm-usage-in-github-comments)
3031

3132
## Pull requests
3233

@@ -537,6 +538,12 @@ If for some reason a feature is introduced in a branch lower than master,
537538
although this is strictly prohibited by other policies, then the entry must
538539
also be in master.
539540

541+
## LLM usage in GitHub comments
542+
543+
When using LLMs to generate comments to maintainers for any purpose other than
544+
direct translation, we would highly appreciate it if you disclosed the relevant
545+
paragraphs as such via markdown quote.
546+
540547
## Thanks
541548

542549
Thank you for contributing to PHP!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--------------------------------------------------------------------
22
The PHP License, version 3.01
3-
Copyright (c) 1999 - 2025 The PHP Group. All rights reserved.
3+
Copyright (c) 1999 - 2026 The PHP Group. All rights reserved.
44
--------------------------------------------------------------------
55

66
Redistribution and use in source and binary forms, with or without

NEWS

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ PHP NEWS
1717
ReflectionProperty::skipLazyInitialization after failed LazyProxy
1818
initialization). (Arnaud)
1919

20+
- BCMath:
21+
. Added NUL-byte validation to BCMath functions. (jorgsowa)
22+
2023
- Date:
2124
. Update timelib to 2022.16. (Derick)
2225

@@ -27,6 +30,7 @@ PHP NEWS
2730
- Fileinfo:
2831
. Fixed bug GH-20679 (finfo_file() doesn't work on remote resources).
2932
(ndossche)
33+
. Fixed bug #66095 (Hide libmagic dynamic symbols). (orlitzky)
3034

3135
- Hash:
3236
. Upgrade xxHash to 0.8.2. (timwolla)
@@ -48,7 +52,7 @@ PHP NEWS
4852
small value). (David Carlier)
4953

5054
- Mail:
51-
. Fixed bug GH-20862 (null pointer dereference in
55+
. Fixed bug GH-20862 (null pointer dereference in
5256
php_mail_detect_multiple_crlf via error_log (jordikroon)
5357

5458
- Mbstring:
@@ -104,6 +108,8 @@ PHP NEWS
104108
- Soap:
105109
. Soap::__setCookie() when cookie name is a digit is now not stored and
106110
represented as a string anymore but a int. (David Carlier)
111+
. Fixed bug GH-21421 (SoapClient typemap property breaks engine assumptions).
112+
(ndossche)
107113

108114
- Sockets:
109115
. Added the TCP_USER_TIMEOUT constant for Linux to set the maximum time in
@@ -134,18 +140,21 @@ PHP NEWS
134140
null destination). (David Carlier)
135141
. Fixed bug GH-13204 (glob() fails if square bracket is in current directory).
136142
(ndossche)
143+
. Add array size maximum to array_diff(). (ndossche)
137144

138145
- Streams:
139146
. Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream
140147
socket context options.
141148
. Added so_reuseaddr streams context socket option that allows disabling
142-
address resuse.
149+
address reuse.
143150
. Fixed bug GH-20370 (User stream filters could violate typed property
144151
constraints). (alexandre-daubois)
145152
. Allowed filtered streams to be casted as fd for select. (Jakub Zelenka)
146153
. Fixed bug GH-21221 (Prevent closing of innerstream of php://temp stream).
147154
(ilutov)
148155
. Improved stream_socket_server() bind failure error reporting. (ilutov)
156+
. Fixed bug #49874 (ftell() and fseek() inconsistency when using stream
157+
filters). (Jakub Zelenka)
149158

150159
- Zip:
151160
. Fixed ZipArchive callback being called after executor has shut down.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ web development. Fast, flexible and pragmatic, PHP powers everything from your
1414
blog to the most popular websites in the world. PHP is distributed under the
1515
[PHP License v3.01](LICENSE).
1616

17-
[![Push](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/push.yml)
17+
[![Test](https://github.com/php/php-src/actions/workflows/test.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/test.yml)
1818
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/php.svg)](https://issues.oss-fuzz.com/issues?q=project:php)
1919

2020
## Documentation

UPGRADING

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,15 @@ PHP 8.6 UPGRADE NOTES
246246
creation of intermediate Closures, the overhead of calling userland
247247
callbacks from internal functions and providing for better insight for the
248248
JIT.
249+
. The performance of the TAILCALL VM has been improved.
249250

250251
- DOM:
251252
. Made splitText() faster and consume less memory.
252253

253254
- JSON:
254255
. Improve performance of encoding arrays and objects.
256+
. Improved performance of indentation generation in json_encode()
257+
when using PHP_JSON_PRETTY_PRINT.
255258

256259
- Standard:
257260
. Improved performance of array_fill_keys().
@@ -261,5 +264,8 @@ PHP 8.6 UPGRADE NOTES
261264
. Improved performance of intval('+0b...', 2) and intval('0b...', 2).
262265
. Improved performance of str_split().
263266

267+
- URI:
268+
. Reduced allocations when reading RFC3986 IPv6/IPFuture hosts and paths.
269+
264270
- Zip:
265271
. Avoid string copies in ZipArchive::addFromString().

UPGRADING.INTERNALS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ PHP 8.6 INTERNALS UPGRADE NOTES
7474
longer is a pointer, but a directly embedded HashTable struct.
7575
. Added a C23_ENUM() helper macro to define forward-compatible fixed-size
7676
enums.
77+
. Extended php_stream_filter_ops with seek method.
78+
. The INI_STR(), INI_INT(), INI_FLT(), and INI_BOOL() macros have been
79+
removed. Instead new zend_ini_{bool|long|double|str|string}_literal()
80+
macros have been added. This fixes an internal naming inconsistency as
81+
"str" usually means zend_string*, and "string" means char*.
82+
However INI_STR() returned a char*
83+
. The INI_ORIG_{INT|STR|FLT|BOOL}() macros have been removed as they are
84+
unused. If this behaviour is required fall back to the zend_ini_*
85+
functions.
7786

7887
========================
7988
2. Build system changes

Zend/Optimizer/block_pass.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ static void assemble_code_blocks(const zend_cfg *cfg, zend_op_array *op_array, z
11851185

11861186
/* rebuild map (just for printing) */
11871187
memset(cfg->map, -1, sizeof(int) * op_array->last);
1188-
for (int n = 0; n < cfg->blocks_count; n++) {
1188+
for (uint32_t n = 0; n < cfg->blocks_count; n++) {
11891189
if (cfg->blocks[n].flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
11901190
cfg->map[cfg->blocks[n].start] = n;
11911191
}
@@ -1493,7 +1493,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr
14931493
* defined. We won't apply some optimization patterns for such variables. */
14941494
static void zend_t_usage(const zend_cfg *cfg, const zend_op_array *op_array, zend_bitset used_ext, zend_optimizer_ctx *ctx)
14951495
{
1496-
int n;
1496+
uint32_t n;
14971497
zend_basic_block *block, *next_block;
14981498
uint32_t var_num;
14991499
uint32_t bitset_len;
@@ -1697,11 +1697,10 @@ static void zend_t_usage(const zend_cfg *cfg, const zend_op_array *op_array, zen
16971697

16981698
static void zend_merge_blocks(const zend_op_array *op_array, const zend_cfg *cfg, uint32_t *opt_count)
16991699
{
1700-
int i;
17011700
zend_basic_block *b, *bb;
17021701
zend_basic_block *prev = NULL;
17031702

1704-
for (i = 0; i < cfg->blocks_count; i++) {
1703+
for (uint32_t i = 0; i < cfg->blocks_count; i++) {
17051704
b = cfg->blocks + i;
17061705
if (b->flags & ZEND_BB_REACHABLE) {
17071706
if ((b->flags & ZEND_BB_FOLLOW) &&

0 commit comments

Comments
 (0)