From: dgdd at free dot fr
Operating system: windows xp
PHP version: 5.1.1
PHP Bug Type: Performance problem
Bug description: strtotime function reduce performance
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 bug report at http://bugs.php.net/?id=35693&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=35693&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=35693&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=35693&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35693&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=35693&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35693&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35693&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35693&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35693&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35693&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35693&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35693&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35693&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35693&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35693&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35693&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35693&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35693&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35693&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35693&r=mysqlcfg