|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-09-15 19:10 UTC] acc_php at riggers dot me dot uk
[2008-12-18 14:57 UTC] pajoye@php.net
[2008-12-18 14:58 UTC] pajoye@php.net
[2009-01-04 01:00 UTC] php-bugs at lists dot php dot net
[2009-03-04 10:35 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
Description: ------------ strftime() called many times results in increasing memory usage. date() is OK. This is on Vista x64. PHP 5.1.6 (only version i have at the moment) on linux does not exhibit the same problem. Reproduce code: --------------- <?php echo "=== strftime() ===\n"; echo "Start: ".memory_get_usage()."\n"; for($i = 0; $i < 10000; $i++ ) { strftime("%d"); } echo "End: ".memory_get_usage()."\n\n"; echo "=== date() ===\n"; echo "Start: ".memory_get_usage()."\n"; for($i = 0; $i < 10000; $i++ ) { date("d"); } echo "End: ".memory_get_usage()."\n"; ?> Expected result: ---------------- End memory usage for strftime() should be close to Start memory usage. Actual result: -------------- C:\php-gtk2>php andy\symftest\strftime.test.php === strftime() === Start: 54384 End: 119800 === date() === Start: 119800 End: 119768 C:\php-gtk2>php -v PHP 5.2.6 (cli) (built: May 2 2008 19:37:32) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies C:\php-gtk2>