mirror of
https://github.com/php/php-src.git
synced 2026-03-25 00:32:23 +01:00
Improve range array overflow error message Added info about "how much it exceeded" and the maximum allowable array size. Makes debugging easier when encountering this specific issue.
13 lines
358 B
PHP
13 lines
358 B
PHP
--TEST--
|
|
Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 4
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
var_dump(range(PHP_INT_MIN, 0));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
The supplied range exceeds the maximum array size by %d elements: start=-%d, end=0, step=1. Calculated size: %d. Maximum size: %d.
|