Skip to content

fix(php): update array_filter signature parameter from flag to mode#326252

Open
jonkloske wants to merge 2 commits into
microsoft:mainfrom
jonkloske:patch-1
Open

fix(php): update array_filter signature parameter from flag to mode#326252
jonkloske wants to merge 2 commits into
microsoft:mainfrom
jonkloske:patch-1

Conversation

@jonkloske

Copy link
Copy Markdown

PHP 8.0+ named arguments throw a Fatal Error if 'flag:' is passed because the internal engine compiles the variable as 'mode'. Updating the built-in language feature string to prevent misleading IDE suggestions. Trivial parameter rename, was a doco/code issue until PHP8 named parameters forced a doco change. Currently available at https://www.php.net/manual/en/function.array-filter.php to confirm.

PHP 8.0+ named arguments throw a Fatal Error if 'flag:' is passed because the internal engine compiles the variable as 'mode'. Updating the built-in language feature string to prevent misleading IDE suggestions.
Copilot AI review requested due to automatic review settings July 17, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates PHP IntelliSense metadata to match PHP 8+ named-argument behavior.

Changes:

  • Renames array_filter’s third parameter from $flag to $mode.
jonkloske added a commit to jonkloske/vscode that referenced this pull request Jul 17, 2026
Updated the signature parameter from 'userdata' to 'arg' for array_walk_recursive and array_walk functions.

This is again due to the change in doco with the PHP8 "named parameter" release. Similar to microsoft#326252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants