Skip to content

Fix forward_static_call_array() can be used outside a class - #5241

Merged
lacatoire merged 1 commit into
php:masterfrom
lacatoire:fix/issue-3282-forward-static-call-array-outside-class
Aug 19, 2026
Merged

Fix forward_static_call_array() can be used outside a class#5241
lacatoire merged 1 commit into
php:masterfrom
lacatoire:fix/issue-3282-forward-static-call-array-outside-class

Conversation

@lacatoire

@lacatoire lacatoire commented Feb 1, 2026

Copy link
Copy Markdown
Member

Fixes #3282

Remove incorrect statement that forward_static_call_array() must be called within a method context. See https://3v4l.org/Cb8AZ

Comment thread reference/funchand/functions/forward-static-call-array.xml Outdated
Comment thread reference/funchand/functions/forward-static-call-array.xml Outdated
@lacatoire
lacatoire force-pushed the fix/issue-3282-forward-static-call-array-outside-class branch from 17450dc to ae8df01 Compare June 23, 2026 14:12
@lacatoire
lacatoire force-pushed the fix/issue-3282-forward-static-call-array-outside-class branch from ae8df01 to 99e31c7 Compare August 19, 2026 06:21
The description claimed the function must be called within a method
context. It can be called anywhere: outside a class it behaves like
call_user_func_array(), without late static binding.

The sibling forward_static_call() does require an active class scope,
so a note records the asymmetry.

Fixes php#3282
@lacatoire
lacatoire force-pushed the fix/issue-3282-forward-static-call-array-outside-class branch from c039eae to 4fef531 Compare August 19, 2026 06:33
@lacatoire
lacatoire merged commit 846dfb8 into php:master Aug 19, 2026
2 checks passed
@lacatoire
lacatoire deleted the fix/issue-3282-forward-static-call-array-outside-class branch August 19, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forward_static_call_array can be used outside of a class too

2 participants