ID: 40172 Updated by: [EMAIL PROTECTED] Reported By: diogo86 at gmail dot com -Status: Open +Status: Feedback Bug Type: Performance problem Operating System: Debian PHP Version: 5.2.0 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Cannot reproduce. Previous Comments: ------------------------------------------------------------------------ [2007-01-19 16:52:52] diogo86 at gmail dot com Description: ------------ The date() function keep consuming memory each time it's called even if it's not assigned to any variable. Reproduce code: --------------- <?php for($i=0; $i<10000; $i++) date('d/m/Y H:i:s'); echo memory_get_usage(); ?> Expected result: ---------------- Something about 46436 bytes of memory usage just like when I call this statement inside that loop: $str = strtoupper($_SERVER['PHP_SELF']); Actual result: -------------- 5485532 bytes of memory usage. ---- Debian Linux 2.6.15-1-486 PHP 5.2.0-8 (cli) (built: Dec 17 2006 20:03:51) [PHP Modules] bcmath bz2 calendar ctype date dba dom exif filter ftp gettext hash iconv json libxml mbstring mime_magic ncurses openssl pcntl pcre PDO pdo_pgsql posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40172&edit=1