Skip to content

Conversation

@Ayesh
Copy link
Member

@Ayesh Ayesh commented Jan 31, 2026

In GH-15647, the array_filter function was changed to throw a ValueError exception when the $mode parameter receives an invalid.

Additionally, it declares a new ARRAY_FILTER_USE_VALUE, assigned (int 1) to it.

This changes the default value of the array_filter function's $mode parameter to use the new constant, changing it from int $mode = 0 to int $mode = ARRAY_FILTER_USE_KEY).

Additionally, this adds the new constant to the UPGRADING file.

@Ayesh
Copy link
Member Author

Ayesh commented Jan 31, 2026

I could use your review, @jorgsowa. Thank you.

Copy link
Contributor

@jorgsowa jorgsowa left a comment

Choose a reason for hiding this comment

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

Thank you. I oversaw this constant, as I didn't want to introduce it first. Makes sense to me.

@jorgsowa
Copy link
Contributor

@Ayesh you may need to regenerate stubs, because tests are failing.

…RRAY_FILTER_USE_VALUE`

In phpGH-15647, the `array_filter` function was changed to throw a
`ValueError` exception when the `$mode` parameter receives an
invalid.

Additionally, it declares a new `ARRAY_FILTER_USE_VALUE`, assigned
(`int 1`) to it.

This changes the default value of the `array_filter` function's
`$mode` parameter to use the new constant, changing it from
`int $mode = 0` to `int $mode = ARRAY_FILTER_USE_KEY)`.
@Ayesh Ayesh force-pushed the array_filter-follow-up branch from 654e9a9 to 8899b14 Compare January 31, 2026 20:42
@Ayesh Ayesh requested a review from bukka as a code owner January 31, 2026 20:42
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Ayesh!

@Ayesh Ayesh closed this in 9dab2c9 Feb 1, 2026
Ayesh added a commit that referenced this pull request Feb 1, 2026
…RRAY_FILTER_USE_VALUE`

In GH-15647, the `array_filter` function was changed to throw a
`ValueError` exception when the `$mode` parameter receives an
invalid.

Additionally, it declares a new `ARRAY_FILTER_USE_VALUE`, assigned
(`int 1`) to it.

This changes the default value of the `array_filter` function's
`$mode` parameter to use the new constant, changing it from
`int $mode = 0` to `int $mode = ARRAY_FILTER_USE_KEY)`.

Closes GH-21100.
@Ayesh
Copy link
Member Author

Ayesh commented Feb 1, 2026

Thank you @iluuu1994 and @jorgsowa.

@Ayesh Ayesh deleted the array_filter-follow-up branch February 1, 2026 03:37
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.

3 participants