Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
beee995
ext/pdo: Keep statement class when ATTR_STATEMENT_CLASS is rejected
iliaal Sep 25, 2026
9db3f18
Merge branch 'PHP-8.4' into PHP-8.5
iliaal Sep 29, 2026
3bb50c1
fibers: fix GH-23921 (Fibers start with error_reporting = 0 when the …
Girgias Sep 26, 2026
8ca2f71
Merge branch 'PHP-8.6'
Girgias Sep 29, 2026
37d0ef5
Zend: Remove zend_atomic.[ch] abstraction (#23927)
henderkes Sep 29, 2026
9f6d3c3
Merge branch 'PHP-8.5' into PHP-8.6
iliaal Sep 29, 2026
d2208a2
tests: Raise test stack for stream error depth limit under MSan (#23985)
realFlowControl Sep 29, 2026
8d708ef
Merge branch 'PHP-8.6'
iliaal Sep 29, 2026
22237f2
ext/pdo: Release driver options after bindParam and bindColumn
iliaal Sep 26, 2026
8c22556
Merge branch 'PHP-8.4' into PHP-8.5
iliaal Sep 29, 2026
fbeec51
Merge branch 'PHP-8.5' into PHP-8.6
iliaal Sep 29, 2026
3884053
Zend: rename zend_object* parameter to "this_ptr" for zend_call_* fun…
Girgias Sep 29, 2026
f49cdd4
Merge branch 'PHP-8.6'
iliaal Sep 29, 2026
7f1e8cb
ext/pdo: Throw a ValueError from bindColumn() for an unknown column (…
iliaal Sep 29, 2026
68301c0
ext/standard: Remove redundant if-branch in rot13 (#23795)
LamentXU123 Sep 29, 2026
023ee4d
Fix GH-23986: Clear the realpath cache in the child after pcntl_fork(…
lazerg Sep 29, 2026
35a9f77
Merge branch 'PHP-8.4' into PHP-8.5
arnaud-lb Sep 29, 2026
cf8eefb
Merge branch 'PHP-8.5' into PHP-8.6
arnaud-lb Sep 29, 2026
008a001
Merge branch 'PHP-8.6'
arnaud-lb Sep 29, 2026
e618474
Reset field_count for OK packet (#23890)
kamil-tekiela Sep 29, 2026
8a67fc2
Merge branch 'PHP-8.4' into PHP-8.5
kamil-tekiela Sep 29, 2026
ef51e2e
Merge branch 'PHP-8.5' into PHP-8.6
kamil-tekiela Sep 29, 2026
0fa359b
Merge branch 'PHP-8.6'
kamil-tekiela Sep 29, 2026
9a3f378
Fix memory leak when closing a statement on a killed connection
kamil-tekiela Apr 15, 2026
3014659
Merge branch 'PHP-8.4' into PHP-8.5
kamil-tekiela Sep 29, 2026
6936744
Merge branch 'PHP-8.5' into PHP-8.6
kamil-tekiela Sep 29, 2026
479a8ed
Merge branch 'PHP-8.6'
kamil-tekiela Sep 29, 2026
f9639b5
Fix __isset escape analysis causing misoptimization
ndossche Sep 28, 2026
4bf483f
Fix property hook escape analysis causing misoptimization
ndossche Sep 28, 2026
3b3f5dd
NEWS
ndossche Sep 29, 2026
2cf3a17
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Sep 29, 2026
f8324d2
Merge branch 'PHP-8.5' into PHP-8.6
ndossche Sep 29, 2026
55e4462
Merge branch 'PHP-8.6'
ndossche Sep 29, 2026
2dc6626
Fix GH-23741: pdo_dblib use-after-free of statement error state
iliaal Sep 17, 2026
8fc841d
Merge branch 'PHP-8.4' into PHP-8.5
iliaal Sep 29, 2026
9dcdf3c
Merge branch 'PHP-8.5' into PHP-8.6
iliaal Sep 29, 2026
bc98961
Merge branch 'PHP-8.6'
iliaal Sep 29, 2026
efb8ad2
ext/libxml: Keep SimpleXML children alive across reconstruction
iliaal Sep 26, 2026
e926c2a
Merge branch 'PHP-8.4' into PHP-8.5
iliaal Sep 29, 2026
77bdd80
openssl: Fix memory leak by doing early salt validation
adapik Sep 29, 2026
266c84c
Merge branch 'PHP-8.6'
ndossche Sep 29, 2026
65f7c71
Merge branch 'PHP-8.5' into PHP-8.6
iliaal Sep 29, 2026
efb0111
Merge branch 'PHP-8.6'
iliaal Sep 29, 2026
0c6db8c
Fall back to epoll_wait when epoll_pwait2 is unavailable at runtime (…
bukka Sep 29, 2026
5261965
Fall back to epoll_wait when epoll_pwait2 is unavailable at runtime (…
bukka Sep 29, 2026
e49b802
Merge branch 'PHP-8.6'
bukka Sep 29, 2026
e0eea65
Fix GH-23842: skipLazyInitialization() copies unresolved constant def…
lazerg Sep 22, 2026
c72a5ca
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Sep 29, 2026
2bb327e
Merge branch 'PHP-8.5' into PHP-8.6
ndossche Sep 29, 2026
0e9abc1
Merge branch 'PHP-8.6'
ndossche Sep 29, 2026
e7b2256
Fix GH-23980: ZEND_ASSERT violation @ ZEND_INCLUDE_OR_EVAL (include/e…
ndossche Sep 29, 2026
0826ebe
Merge branch 'PHP-8.4' into PHP-8.5
ndossche Sep 29, 2026
8d6b5be
Merge branch 'PHP-8.5' into PHP-8.6
ndossche Sep 29, 2026
b2e5f9e
Merge branch 'PHP-8.6'
ndossche Sep 29, 2026
a85fcf3
Use C11 atomics for epoll_pwait2_available
bukka Sep 29, 2026
8184e9e
ext/bcmath: Clear the sign of BcMath\Number results that truncate to …
iliaal Sep 25, 2026
6030e56
Merge branch 'PHP-8.4' into PHP-8.5
iliaal Sep 29, 2026
6bd5ab8
Merge branch 'PHP-8.5' into PHP-8.6
iliaal Sep 29, 2026
b19f17e
Merge branch 'PHP-8.6'
iliaal Sep 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ PHP NEWS
- MySQLi:
. Fix GH-22854: Fixed failed assertion when accessing mysqli property after
failed reconnection. (Kamil Tekiela)
. Fixed memory leak when closing a prepared statement after its connection
was killed. (Kamil Tekiela)

- MySQLnd:
. Fixed field_count not resetting on OK packet. (Kamil Tekiela)

- Opcache:
. Fixed bug GH-23693 (Tracing JIT produces wrong results for a guard on a
Expand Down
6 changes: 6 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ PHP 8.7 UPGRADE NOTES
1. Backward Incompatible Changes
========================================

- PDO:
. PDOStatement::bindColumn() now throws a ValueError when the column name is
not present in the result set. It previously reported the condition
through PDO::ATTR_ERRMODE and returned false.

- Standard:
. The number of filters that can be chained in a php://filter URL is limited
to 16 by default. Set the stream context option max_filter_count to change
Expand Down Expand Up @@ -79,3 +84,4 @@ PHP 8.7 UPGRADE NOTES
- Standard:
. Improved performance of array_splice() when inserting without removing
elements.
. Improved performance of str_rot13().
6 changes: 4 additions & 2 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ PHP 8.7 INTERNALS UPGRADE NOTES
- Removed zend_execute_scripts(). Manually call zend_execute_script() in a loop
instead.
- Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
- Removed zend_atomic.h and the zend_atomic_* types and functions.
Use the standard C11 atomic_* types and functions instead.
- The sapi_terminate_process() function was removed.
- The sapi_force_http_10() function was removed.
- The sapi_get_fd() function was removed.
Expand All @@ -33,8 +35,8 @@ PHP 8.7 INTERNALS UPGRADE NOTES
========================

- Windows build system changes:
. C sources are now compiled as C17. MSVC builds require Visual Studio
2026 or later and enable /experimental:c11atomics.
. C sources are now compiled as C17 and require C11 atomics. MSVC builds require
Visual Studio 2026 or later and enable /experimental:c11atomics.
. C++-only extension compiler flags can be added to CXXFLAGS_<EXTENSION>.

- Unix build system changes:
Expand Down
4 changes: 4 additions & 0 deletions Zend/Optimizer/escape_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ static bool is_allocation_def(const zend_op_array *op_array, const zend_ssa *ssa
&& !ce->destructor
&& !ce->__get
&& !ce->__set
&& !ce->__isset
&& !ce->num_hooked_props
&& !(ce->ce_flags & forbidden_flags)
&& (ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
return true;
Expand Down Expand Up @@ -239,6 +241,8 @@ static bool is_local_def(const zend_op_array *op_array, const zend_ssa *ssa, int
&& !ce->destructor
&& !ce->__get
&& !ce->__set
&& !ce->__isset
&& !ce->num_hooked_props
&& !ce->parent) {
return true;
}
Expand Down
17 changes: 17 additions & 0 deletions Zend/tests/fibers/gh23921.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--TEST--
GH-23921 (Fibers start with error_reporting = 0 when the error_reporting INI directive is not set)
--FILE--
<?php
echo error_reporting(), "\n";
(new Fiber(function () {
echo error_reporting(), "\n";
echo $undefined;
echo "after\n";
}))->start();
?>
--EXPECTF--
30719
30719

Warning: Undefined variable $undefined in %s on line 5
after
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
Silence operator must not change the error_reporting value within the fiber
--FILE--
<?php

error_reporting(E_WARNING);

@(new Fiber(function () {
var_dump(E_ALL);
var_dump(E_WARNING);
var_dump(error_reporting());
}))->start();

?>
--EXPECT--
int(30719)
int(2)
int(2)
32 changes: 32 additions & 0 deletions Zend/tests/lazy_objects/gh23842.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--TEST--
GH-23842: skipLazyInitialization() copies an unresolved constant default with opcache
--CREDITS--
DirkTrunkstar
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_cache_only=0
--FILE--
<?php

class Currency {
public const string EUR = 'EUR';
}

class Product {
public string $currency = Currency::EUR;
}

$reflector = new ReflectionClass(Product::class);
$product = $reflector->newLazyGhost(function () {
throw new \Exception('initializer');
});
$reflector->getProperty('currency')->skipLazyInitialization($product);

var_dump($product->currency);

?>
--EXPECT--
string(3) "EUR"
28 changes: 14 additions & 14 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -3791,13 +3791,13 @@ static bool zend_is_callable_check_class(zend_string *name, zend_class_entry *sc
const zend_class_entry *frame_scope = get_scope(frame);
fcc->calling_scope = ce;
if (frame_scope && !fcc->object) {
zend_object *object = zend_get_this_object(frame);
zend_object *this_ptr = zend_get_this_object(frame);

if (object &&
instanceof_function(object->ce, frame_scope) &&
if (this_ptr &&
instanceof_function(this_ptr->ce, frame_scope) &&
instanceof_function(frame_scope, ce)) {
fcc->object = object;
fcc->called_scope = object->ce;
fcc->object = this_ptr;
fcc->called_scope = this_ptr->ce;
} else {
fcc->called_scope = ce;
}
Expand Down Expand Up @@ -3870,13 +3870,13 @@ static zend_always_inline bool zend_is_method_callable(zend_string *callable, co
if (ZSTR_HAS_CE_CACHE(class_name) && ZSTR_GET_CE_CACHE(class_name)) {
fcc->calling_scope = ZSTR_GET_CE_CACHE(class_name);
if (scope && !fcc->object) {
zend_object *object = zend_get_this_object(frame);
zend_object *this_ptr = zend_get_this_object(frame);

if (object &&
instanceof_function(object->ce, scope) &&
if (this_ptr &&
instanceof_function(this_ptr->ce, scope) &&
instanceof_function(scope, fcc->calling_scope)) {
fcc->object = object;
fcc->called_scope = object->ce;
fcc->object = this_ptr;
fcc->called_scope = this_ptr->ce;
} else {
fcc->called_scope = fcc->calling_scope;
}
Expand Down Expand Up @@ -3982,10 +3982,10 @@ static zend_always_inline bool zend_is_method_callable(zend_string *callable, co
retval = true;
call_via_handler = (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
if (call_via_handler && !fcc->object) {
zend_object *object = zend_get_this_object(frame);
if (object &&
instanceof_function(object->ce, fcc->calling_scope)) {
fcc->object = object;
zend_object *this_ptr = zend_get_this_object(frame);
if (this_ptr &&
instanceof_function(this_ptr->ce, fcc->calling_scope)) {
fcc->object = this_ptr;
}
}
}
Expand Down
26 changes: 13 additions & 13 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef struct _zend_fcall_info_cache {
zend_function *function_handler;
zend_class_entry *calling_scope;
zend_class_entry *called_scope;
zend_object *object; /* Instance of object for method calls */
zend_object *object; /* Pointer for object representing $this */
zend_object *closure; /* Closure reference, only if the callable *is* the object */
} zend_fcall_info_cache;

Expand Down Expand Up @@ -858,16 +858,16 @@ static zend_always_inline zend_result zend_call_function_with_return_value(

/* Call the provided zend_function with the given params.
* If retval_ptr is NULL, the return value is discarded.
* If object is NULL, this must be a free function or static call.
* If this_ptr is NULL, this must be a free function or static call.
* called_scope must be provided for instance and static method calls. */
ZEND_API void zend_call_known_function_ex(
zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr,
zend_function *fn, zend_object *this_ptr, zend_class_entry *called_scope, zval *retval_ptr,
uint32_t param_count, zval *params, HashTable *named_params, uint32_t consumed_args);

static zend_always_inline void zend_call_known_function(
zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr,
zend_function *fn, zend_object *this_ptr, zend_class_entry *called_scope, zval *retval_ptr,
uint32_t param_count, zval *params, HashTable *named_params) {
zend_call_known_function_ex(fn, object, called_scope, retval_ptr, param_count, params, named_params, 0);
zend_call_known_function_ex(fn, this_ptr, called_scope, retval_ptr, param_count, params, named_params, 0);
}

static zend_always_inline void zend_call_known_fcc_ex(
Expand All @@ -892,32 +892,32 @@ static zend_always_inline void zend_call_known_fcc(

/* Call the provided zend_function instance method on an object. */
static zend_always_inline void zend_call_known_instance_method(
zend_function *fn, zend_object *object, zval *retval_ptr,
zend_function *fn, zend_object *this_ptr, zval *retval_ptr,
uint32_t param_count, zval *params)
{
zend_call_known_function(fn, object, object->ce, retval_ptr, param_count, params, NULL);
zend_call_known_function(fn, this_ptr, this_ptr->ce, retval_ptr, param_count, params, NULL);
}

static zend_always_inline void zend_call_known_instance_method_with_0_params(
zend_function *fn, zend_object *object, zval *retval_ptr)
zend_function *fn, zend_object *this_ptr, zval *retval_ptr)
{
zend_call_known_instance_method(fn, object, retval_ptr, 0, NULL);
zend_call_known_instance_method(fn, this_ptr, retval_ptr, 0, NULL);
}

static zend_always_inline void zend_call_known_instance_method_with_1_params(
zend_function *fn, zend_object *object, zval *retval_ptr, zval *param)
zend_function *fn, zend_object *this_ptr, zval *retval_ptr, zval *param)
{
zend_call_known_instance_method(fn, object, retval_ptr, 1, param);
zend_call_known_instance_method(fn, this_ptr, retval_ptr, 1, param);
}

ZEND_API void zend_call_known_instance_method_with_2_params(
zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2);
zend_function *fn, zend_object *this_ptr, zval *retval_ptr, zval *param1, zval *param2);

/* Call method if it exists. Return FAILURE if method does not exist or call failed.
* If FAILURE is returned, retval will be UNDEF. As such, destroying retval unconditionally
* is legal. */
ZEND_API zend_result zend_call_method_if_exists(
zend_object *object, zend_string *method_name, zval *retval,
zend_object *this_ptr, zend_string *method_name, zval *retval,
uint32_t param_count, zval *params);

ZEND_API zend_result zend_delete_global_variable(zend_string *name);
Expand Down
75 changes: 0 additions & 75 deletions Zend/zend_atomic.c

This file was deleted.

Loading