PHP 4.0 Bug #3678: array overhead not good

From: Date: Wed, 01 Mar 2000 10:17:12 +0000
Subject: PHP 4.0 Bug #3678: array overhead not good
Groups: php.dev 
Request: Send a blank email to php-dev+get-16185@lists.php.net to get a copy of this message
From: wico@cnh.nl Operating system: guess every :) PHP version: 4.0 Latest CVS (01/03/2000) PHP Bug Type: Performance problem Bug description: array overhead not good this is what i did: <? for ($x = 0; $x < 500000; $x++) { $test[$x] = ""; } echo "DONE<BR>\n"; flush(); sleep(60); ?> after running this i found apache useing 65MB of memmory 25520 nobody 0 0 67212 65M 2180 S 0 0.0 26.0 0:04 httpsd and it doesn't matter if you do this: $test[$x] = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AA"; it keeps 65MB I find this strange... Keep up the good work Greetz, Wico

« previous php.dev (#16185) next »