Click to See Complete Forum and Search --> : A probable bug in PHP


PHPForever
04-08-2003, 03:24 PM
Written by George Andre P.
I think there is a bug in PHP. However I need to confirm it on large basis. The bellow code should crash the latest version of PHP on Windows 2000 Pro Systems. I have tested it on 2 Systems thus far and it has crashed PHP on both. If some of you could run this code on your systems and just verify this I would much appreciate it. Try to run in on non-NT based systems. The code generates a 2D array that is of size 200000. 1D array of the same size works fine.

Thank you all.
Code: ---------------------------------------------------------------------------

<?php
$lcv = 0;
while ($lcv < 1) {
$new_[] = $lcv;
$lcv ++;
}
$lcv = 0;
while ($lcv < 200000) {
$result_[] = $new_;
$lcv ++;
}
//echo $lcv . "\n";
?>

sgoku01
04-12-2003, 02:53 PM
I tested it on a WinXP Pro version with PHP 4.3.0 installed and it crashed php :/

rklapwijk
04-16-2003, 11:35 AM
When uncommented the echo i got this mesage:

PHP has encountered an Access Violation at 77F52F9C

PHP crashed...

Here are the specs of my development sys:

- WIN XP Pro
- IIS 5.1
- PHP 4.3.1
- P4 2,4 Mhz
- 768 MB Ram