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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 22:01:29 2024 UTC