|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35693 strtotime function reduce performance
Submitted: 2005-12-15 22:58 UTC Modified: 2005-12-16 00:21 UTC
From: dgdd at free dot fr Assigned: derick (profile)
Status: Not a bug Package: Performance problem
PHP Version: 5.1.1 OS: windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
14 - 2 = ?
Subscribe to this entry?

 [2005-12-15 22:58 UTC] dgdd at free dot fr
Sorry for my bad english.

PHP v5.1.1 : when using strtotime function intensively 
in my script the performance as reduced and the script is generate in 0,250 s ?

With PHP 5.0.5, my script is generate in 0,055 s !

I'm test my script with PHP 5.1.1 without strtotime function  -> this page was generate in 0,050 s !

Reproduce code:
for ($i=1; $i<=30; $i++) {
$timestamp = strtotime("-". (30-$i) ." day");

for ( $i = 0; $i < 30; $i++ ){
 $j = 29 - $i;
 $time_colone	= date("y",strtotime("-$j day")).date("z",strtotime("-$j day"));



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-15 23:40 UTC]
Assigned to the maintainer.
 [2005-12-15 23:55 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Dupe of bug #35658
 [2005-12-16 00:21 UTC] dgdd at free dot fr
Sorry :(

My problem is solved, 
thanks you 

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 11:03:36 2021 UTC