mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
17 lines
321 B
PHP
17 lines
321 B
PHP
--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
|