From: webmaster at smiliz dot info Operating system: Windows XP PRO PHP version: 5.1.1 PHP Bug Type: Performance problem Bug description: function strtotime
Description: ------------ In PHP v5.1.1, strtotime() will parse days of the month with and ordinal suffix, in the format "+ 1 day", however this is no longer possible in PHP5.1.1 The same string without the ordinal suffix ("+ 1 day") returns a timestamp as expected. Reproduce code: --------------- <?php // For exemple : $duree_unite = "jours"; $duree_quantite = 1; $duree_unite = str_replace("secondes","second",$duree_unite); $duree_unite = str_replace("heures","hour",$duree_unite); $duree_unite = str_replace("jours","day",$duree_unite); $duree_unite = str_replace("semaines","week",$duree_unite); $duree_unite = str_replace("mois","month",$duree_unite); $duree_unite = str_replace("annee","year",$duree_unite); $bandate = strtotime("+ $duree_quantite $duree_unite"); echo $bandate; ?> Expected result: ---------------- Both variables $duree_quantite and $duree_unite should contain, is empty and prints nothing. Actual result: -------------- is empty and prints nothing. -- Edit bug report at http://bugs.php.net/?id=35456&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35456&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35456&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35456&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35456&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35456&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35456&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35456&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35456&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35456&r=support Expected behavior: http://bugs.php.net/fix.php?id=35456&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35456&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35456&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35456&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35456&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35456&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35456&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35456&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35456&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35456&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35456&r=mysqlcfg