ID:               46075
 Updated by:       paj...@php.net
 Reported By:      acc_php at riggers dot me dot uk
-Status:           Assigned
+Status:           Feedback
 Bug Type:         Date/time related
 Operating System: win32 only
 PHP Version:      5.2CVS-2008-09-15
 Assigned To:      pajoye
 New Comment:

please try the next 5.3/HEAD snapshots (could be related to #46889).


Previous Comments:
------------------------------------------------------------------------

[2008-09-15 19:10:39] acc_php at riggers dot me dot uk

Same problem I'm afraid:

C:\php-latest>php.exe C:\php-gtk2\andy\symftest\strftime.test.php
=== strftime() ===
Start: 59072
End: 124488

=== date() ===
Start: 124488
End: 124456

C:\php-latest>php -v
PHP 5.2.7-dev (cli) (built: Aug  6 2008 03:00:55)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

------------------------------------------------------------------------

[2008-09-14 12:12:14] acc_php at riggers dot me dot uk

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>


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=46075&edit=1

Reply via email to