#35693 [Opn->Asn]: strtotime function reduce performance
| From: | tony2001@php.net | Date: | Thu, 15 Dec 2005 22:40:15 +0000 |
| Subject: | #35693 [Opn->Asn]: strtotime function reduce performance | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90502@lists.php.net to get a copy of this message | ||
ID: 35693
Updated by: tony2001@php.net
Reported By: dgdd at free dot fr
-Status: Open
+Status: Assigned
Bug Type: Performance problem
Operating System: windows xp
PHP Version: 5.1.1
-Assigned To:
+Assigned To: derick
New Comment:
Assigned to the maintainer.
Previous Comments:
------------------------------------------------------------------------
[2005-12-15 22:58:57] dgdd at free dot fr
Description:
------------
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"));
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35693&edit=1