Skip to content

[pull] master from php:master#514

Merged
pull[bot] merged 14 commits intoturkdevops:masterfrom
php:master
Nov 5, 2025
Merged

[pull] master from php:master#514
pull[bot] merged 14 commits intoturkdevops:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Nov 5, 2025

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 : )

NattyNarwhal and others added 14 commits November 4, 2025 12:07
(Looks like this wasn't bumped for 8.4.15-dev previously)
* PHP-8.5:
  [ci skip] Update NEWS for PHP 8.5.0 RC4
The return value is already overwritten by this point so we do have to
clean up the old return value (i.e. dataset) after all.
Both enums and integers map to TidyInteger, however, in the TidyInteger
case we always used zval_get_long(). So for a non-numeric string, this
would get turned into 0. 0 is the first enum value in that case, so the
wrong enum value could be selected.

To solve this, add special handling for strings and (stringable) objects
such that we can explicitly check for numeric strings, and if they're
not, handle them as normal strings instead of as 0.

Closes GH-20387.
* PHP-8.5:
  PHP 8.5 is now for PHP 8.5.1-dev
* PHP-8.4:
  PHP 8.4 is now for PHP 8.4.16-dev
* PHP-8.5:
  PHP 8.4 is now for PHP 8.4.16-dev
* PHP-8.3:
  Fix GH-20374: PHP with tidy and custom-tags
  pgsql: Fix memory leak when object init fails (#20387)
* PHP-8.4:
  Fix GH-20374: PHP with tidy and custom-tags
  pgsql: Fix memory leak when object init fails (#20387)
* PHP-8.5:
  Fix GH-20374: PHP with tidy and custom-tags
  pgsql: Fix memory leak when object init fails (#20387)
We never need to use refcounted copies for arguments because the copy to
the call frame already increments the refcount.

For the following benchmark:
```php
$a = range(0, 10);
for ($i = 0; $i < 1000000; $i++)
    array_walk($a, fn ($val, $idx, $arg) => $val + $arg, 2);
```

On an i7-4790:
```
Benchmark 1: ./sapi/cli/php x.php
  Time (mean ± σ):     593.0 ms ±   5.4 ms    [User: 589.8 ms, System: 1.7 ms]
  Range (min … max):   583.3 ms … 600.9 ms    10 runs

Benchmark 2: ./sapi/cli/php_old x.php
  Time (mean ± σ):     637.8 ms ±   4.6 ms    [User: 633.9 ms, System: 2.2 ms]
  Range (min … max):   633.4 ms … 649.2 ms    10 runs

Summary
  ./sapi/cli/php x.php ran
    1.08 ± 0.01 times faster than ./sapi/cli/php_old x.php
```

On an i7-1185G7:
```
Benchmark 1: ./sapi/cli/php x.php
  Time (mean ± σ):     362.3 ms ±   2.0 ms    [User: 359.9 ms, System: 1.9 ms]
  Range (min … max):   359.6 ms … 367.1 ms    10 runs

Benchmark 2: ./sapi/cli/php_old x.php
  Time (mean ± σ):     385.5 ms ±   1.8 ms    [User: 383.2 ms, System: 1.9 ms]
  Range (min … max):   381.5 ms … 387.2 ms    10 runs

Summary
  ./sapi/cli/php x.php ran
    1.06 ± 0.01 times faster than ./sapi/cli/php_old x.php
```
@pull pull bot locked and limited conversation to collaborators Nov 5, 2025
@pull pull bot added the ⤵️ pull label Nov 5, 2025
@pull pull bot merged commit 1cf63a9 into turkdevops:master Nov 5, 2025
1 check failed
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