Skip to content

[pull] master from php:master#1100

Merged
pull[bot] merged 20 commits into
turkdevops:masterfrom
php:master
Jul 17, 2026
Merged

[pull] master from php:master#1100
pull[bot] merged 20 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 17, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iliaal and others added 20 commits July 17, 2026 11:38
…22788)

The ZEND_CALLABLE_CONVERT_PARTIAL handler relies on zp_bind() to move
each pre-bound argument into the partial and never frees positional
arguments itself. When construction throws before an argument is moved,
a NULL op_array from zp_get_op_array() or a bound-argument type error,
the unmoved arguments were owned by nobody and leaked. Free the
arguments that were not moved at each throwing path.
)

A partial over a closure whose op_array is not persistent shallow-copies
the closure's op_array into the per-request PFA cache as a lifetime
anchor. The copy inherited ZEND_ACC_HEAP_RT_CACHE and the run_time_cache
pointer, so destroy_op_array() freed the closure's cache twice: once when
the closure was released and again at PFA cache teardown. Use
function_add_ref() for the copy, which resets the per-request
run_time_cache and static_variables_ptr map pointers, so only the live
closure owns and frees the cache.
`run-tests.php --file-cache-prime` sets opcache.file_cache to /tmp which makes it difficult to clear the cache.

Set opcache.file_cache to /tmp/php-run-tests-file-cache, and clear the directory when --file-cache-prime is specified.
Optimize
- `ReflectionParameter::__construct()`
- `ReflectionClass::getMethods()`

Given that the `Closure` class is declared as `final`, for some class entry
`ce` to represent an instance of a `Closure` it must be exactly
`zend_ce_closure`. Replace the `instanceof_function()` call with a simple
pointer comparison.
While different callers provided different levels of indentation to the
function, the indentation was never used. Remove the parameter and update
callers.
…mon`

Internal and userland functions store their documentation comments the same
way, as a `zend_string` pointer. These pointers are part of the common elements
at the start of both `zend_op_array` and `zend_internal_function` that are made
available via `zend_function.common`; use the common access rather than
checking for the different types of functions individually.
…ng()`

For dynamic properties all of the representation details are known immediately,
skip the checks for comments, flags, types, defaults, and hooks and use
an early return.
When a variable has a single consistent initialization location, move the
declaration to be combined with the initialization.
Move variable declarations into the loop start macro where possible to have the
types of the variables clear in the loop.
If they cannot be declared at the point of initialization, at least move the
declarations closer to where the variables are used.
Consistently indent with tabs, split up some long lines, combine some nested
conditions, and overall try to improve readability.
The SIOCGIFINDEX fallback checked ZSTR_LEN against sizeof(ifr.ifr_name)
but did not return on overflow, then memcpy'd ZSTR_LEN+1 bytes into the
fixed ifr_name buffer, so an over-long interface name overran the stack.
This regressed in 3e9b530, which replaced the original bounded
strlcpy with an unguarded memcpy. Restore the strlcpy plus else-if guard,
matching PHP-8.4.

Closes GH-22379
* PHP-8.5:
  ext/sockets: bound interface name copy in from_zval_write_ifindex()
GH-20601 capped the timeout in ftp_connect() so a value that overflows the
timeval conversion cannot reach php_network_set_limit_time(). ftp_ssl_connect()
and ftp_set_option(FTP_TIMEOUT_SEC) kept rejecting only non-positive values, so
PHP_INT_MAX still reached ftp_open() and my_poll() through them.

Apply the same bound to both, factored into a shared PHP_FTP_TIMEOUT_SEC_MAX
macro. ftp_ssl_connect() with PHP_INT_MAX hung before this rather than
reporting the bad argument.

Closes GH-22767
* PHP-8.4:
  ext/ftp: apply the connect timeout ceiling to the remaining entry points
* PHP-8.5:
  ext/ftp: apply the connect timeout ceiling to the remaining entry points
@pull pull Bot locked and limited conversation to collaborators Jul 17, 2026
@pull pull Bot added the ⤵️ pull label Jul 17, 2026
@pull
pull Bot merged commit 46a35ff into turkdevops:master Jul 17, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants