#46910 [NEW]: strtotime() leaks memory
| From: | vnegrier at optilian dot com | Date: | Fri, 19 Dec 2008 22:39:43 +0000 |
| Subject: | #46910 [NEW]: strtotime() leaks memory | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-132184@lists.php.net to get a copy of this message | ||
From: vnegrier at optilian dot com
Operating system: Linux 2.6
PHP version: 5.2.8
PHP Bug Type: Date/time related
Bug description: strtotime() leaks memory
Description:
------------
Each call to strtotime() leaks about 1 kilobyte of memory.
This happens with 5.2.8 and 5.3.0a3, 5.2.6 does not have this problem.
Reproduce code:
---------------
<?
$test = "19 Dec 2008 23:30:12";
for ($i = 0; $i < 1000000; $i++) strtotime($test);
?>
Actual result:
--------------
with 5.2.8 php uses more than 1 gb of memory at the end of script
execution.
--
Edit bug report at http://bugs.php.net/?id=46910&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46910&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46910&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46910&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46910&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46910&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46910&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46910&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46910&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46910&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46910&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46910&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46910&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46910&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46910&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46910&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46910&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46910&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46910&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46910&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46910&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46910&r=mysqlcfg