Commit 74fad616074 for php.net

commit 74fad61607479189e9287273f96bbf348751159a
Author: ndossche <7771979+ndossche@users.noreply.github.com>
Date:   Sat Mar 21 22:58:48 2026 +0100

    Add test for array_diff() array maximum

    Forgot to commit this in 614b22ab.

diff --git a/ext/standard/tests/array/array_diff_max_elements.phpt b/ext/standard/tests/array/array_diff_max_elements.phpt
new file mode 100644
index 00000000000..4c65cd049b3
--- /dev/null
+++ b/ext/standard/tests/array/array_diff_max_elements.phpt
@@ -0,0 +1,16 @@
+--TEST--
+array_diff(): Max elements
+--FILE--
+<?php
+
+$power = 20; // Chosen to be well within a memory_limit
+$arr = range(0, 2**$power);
+try {
+    array_diff(...array_fill(0, 2**(32-$power), $arr));
+} catch (Error $e) {
+    echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECTF--
+The total number of elements must be lower than %d