Commit 08a6ebfe311 for php.net

commit 08a6ebfe3116e149d13b572385bac345a301ef21
Author: Gina Peter Banyard <girgias@php.net>
Date:   Thu Mar 5 12:15:21 2026 +0000

    ext/spl: ArrayObject improve ZPP test for usort() methods

diff --git a/ext/spl/tests/ArrayObject/arrayObject_uasort_error1.phpt b/ext/spl/tests/ArrayObject/arrayObject_uasort_error1.phpt
index d4c85324512..32defd35e6f 100644
--- a/ext/spl/tests/ArrayObject/arrayObject_uasort_error1.phpt
+++ b/ext/spl/tests/ArrayObject/arrayObject_uasort_error1.phpt
@@ -1,26 +1,16 @@
 --TEST--
-Test ArrayObject::uasort() function : wrong arg count
+ArrayObject::uasort() function: non callable error
 --FILE--
 <?php
-/* Sort the entries by values user defined function.
- * Source code: ext/spl/spl_array.c
- * Alias to functions:
- */

 $ao = new ArrayObject();

 try {
-    $ao->uasort();
-} catch (ArgumentCountError $e) {
-    echo $e->getMessage() . "\n";
+    $ao->uasort('not_a_valid_function');
+} catch (Throwable $e) {
+    echo $e::class, ': ', $e->getMessage(), "\n";
 }

-try {
-    $ao->uasort(1,2);
-} catch (ArgumentCountError $e) {
-    echo $e->getMessage() . "\n";
-}
 ?>
 --EXPECT--
-ArrayObject::uasort() expects exactly 1 argument, 0 given
-ArrayObject::uasort() expects exactly 1 argument, 2 given
+TypeError: uasort(): Argument #2 ($callback) must be a valid callback, function "not_a_valid_function" not found or invalid function name
diff --git a/ext/spl/tests/ArrayObject/arrayObject_uksort_error1.phpt b/ext/spl/tests/ArrayObject/arrayObject_uksort_error1.phpt
index 71164383e41..11b40aae8c8 100644
--- a/ext/spl/tests/ArrayObject/arrayObject_uksort_error1.phpt
+++ b/ext/spl/tests/ArrayObject/arrayObject_uksort_error1.phpt
@@ -1,26 +1,16 @@
 --TEST--
-Test ArrayObject::uksort() function : wrong arg count
+ArrayObject::uksort() function: non callable error
 --FILE--
 <?php
-/* Sort the entries by key using user defined function.
- * Source code: ext/spl/spl_array.c
- * Alias to functions:
- */

 $ao = new ArrayObject();

 try {
-    $ao->uksort();
-} catch (ArgumentCountError $e) {
-    echo $e->getMessage() . "\n";
+    $ao->uksort('not_a_valid_function');
+} catch (Throwable $e) {
+    echo $e::class, ': ', $e->getMessage(), "\n";
 }

-try {
-    $ao->uksort(1,2);
-} catch (ArgumentCountError $e) {
-    echo $e->getMessage() . "\n";
-}
 ?>
 --EXPECT--
-ArrayObject::uksort() expects exactly 1 argument, 0 given
-ArrayObject::uksort() expects exactly 1 argument, 2 given
+TypeError: uksort(): Argument #2 ($callback) must be a valid callback, function "not_a_valid_function" not found or invalid function name