[GIT-PULLS] [php-src] PR #22831: Optimize array intersection functions for empty operands

[email protected] (mehmetcansahin) Mon, 20 Jul 2026 14:13:41 +0000
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/22831
Author: mehmetcansahin

Avoid unnecessary iteration when an empty operand guarantees an empty result for `array_intersect_key()`, `array_intersect_assoc()`, and `array_uintersect_assoc()`.

Includes regression tests covering validation and observable callback/warning behavior.