PHP 4.0 Bug #5006: max() crashes on arrays
| From: | chris at nameboy dot com | Date: | Tue, 13 Jun 2000 17:14:56 +0000 |
| Subject: | PHP 4.0 Bug #5006: max() crashes on arrays | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21219@lists.php.net to get a copy of this message | ||
From: chris@nameboy.com
Operating system: Linux 2.2
PHP version: 4.0.0 Release
PHP Bug Type: Reproduceable crash
Bug description: max() crashes on arrays
PHP crashes when I pass an array of integers to the max()
function; this feature worked fine for me in PHP3.
PHP/4.0.0 was configured with:
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --enable-vers
ioning --with-config-file-path=/usr/local/apache/conf --disable-xml --enable-trans-sid
--enable-debug
I'm running Apache/1.3.12.
Example code:
<html><head><title>max() tester</title></head>
<body>
<?
$arr[0] = 123;
$arr[1] = 987;
$arr[2] = 222;
$arr[3] = 0;
$arr[4] = -1;
$arr[5] = 442;
echo "max of arr is " . max($arr) . "<p>\n";
?>
</body></html>