Skip to content

Remove redundant check in DECLARE_LAMBDA_FUNCTION handler - #25158

Merged
iluuu1994 merged 3 commits into
php:masterfrom
iluuu1994:redundant-check-in-DECLARE_LAMBDA_FUNCTION
Nov 2, 2026
Merged

iluuu1994 merged 3 commits into
php:masterfrom
iluuu1994:redundant-check-in-DECLARE_LAMBDA_FUNCTION

Conversation

@iluuu1994

Copy link
Copy Markdown
Member

When Z_TYPE(EX(This)) == IS_OBJECT, EX(func) is always non-static.

Also remove EXPECTED() while we're at it: Declaring static closures from non-static functions is not rare.

When `Z_TYPE(EX(This)) == IS_OBJECT`, EX(func)  is always non-static.
Declaring static closures from non-static functions is not rare.
@iluuu1994
iluuu1994 requested a review from dstogov as a code owner November 2, 2026 15:53
@iluuu1994 iluuu1994 changed the title Redundant check in declare lambda function Remove redundant check in DECLARE_LAMBDA_FUNCTION handler Nov 2, 2026
@iluuu1994
iluuu1994 merged commit 39fa31b into php:master Nov 2, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant