php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46910 strtotime() leaks memory
Submitted: 2008-12-19 22:39 UTC Modified: 2008-12-19 22:45 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: vnegrier at optilian dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.2.8 OS: Linux 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vnegrier at optilian dot com
New email:
PHP Version: OS:

 

 [2008-12-19 22:39 UTC] vnegrier at optilian dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-19 22:45 UTC] derick@php.net
This has already been fixed in CVS (yesterday) -- please try a snapshot.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 12:01:31 2025 UTC