Commit 9e8dbc1d1c6 for php.net
commit 9e8dbc1d1c60dd13a80fc01dd1dd2f496ca44ade
Author: Ayesh Karunaratne <ayesh@aye.sh>
Date: Sat Apr 11 00:16:54 2026 +0530
ext/standard: fix wrong array_filter() default value
Follow-up to GH-21100, that mistakenly set the default value of
the `array_filter()` as `ARRAY_FILTER_USE_KEY`, when it should
be `ARRAY_FILTER_USE_VALUE`, which is the newly defined constant.
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index 1f3d5617f8d..c437f0d7f6c 100644
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -1879,7 +1879,7 @@ function array_product(array $array): int|float {}
function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {}
-function array_filter(array $array, ?callable $callback = null, int $mode = ARRAY_FILTER_USE_KEY): array {}
+function array_filter(array $array, ?callable $callback = null, int $mode = ARRAY_FILTER_USE_VALUE): array {}
function array_find(array $array, callable $callback): mixed {}
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 991d76d91fc..1ba20c6b26c 100644
Binary files a/ext/standard/basic_functions_arginfo.h and b/ext/standard/basic_functions_arginfo.h differ
diff --git a/ext/standard/basic_functions_decl.h b/ext/standard/basic_functions_decl.h
index fce41100fc7..ab27bb64f0c 100644
Binary files a/ext/standard/basic_functions_decl.h and b/ext/standard/basic_functions_decl.h differ