Re: [PHP] Re: strtotime

On Sun, 2008-11-09 at 19:46 +0100, gilles wrote:
"Thodoris" <tgol@xxxxxxxxxx> a crit dans le message de news:
O/H Bastien Koert ??????:
2008/11/8 Maciek Sokolewicz <tularis@xxxxxxxxx>

gilles wrote:

Avec la version 4 de php, strtotime("20080950") fonctionne correctement
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide

This is an ENGLISH list, please rephrase your question in english and
people might understand.

Cette liste est une liste anglaise, reformulent svp votre question en
anglais svp.


- Tul

PHP General Mailing List (
To unsubscribe, visit:

I'll translate

In PHP4, strtotime works fine

Define "works fine".

in PHP5 strtotime gives a result of 19700101 when the data entered was

PHP version 5.1.6
Apache 2

This strtotime("20080950") returns nothing.

"Works fine" in php4 means date("d/m/Y",strtotime("20080950")) returns
20/10/2008, which is correct.

Which is actually incorrect (I've never seen the 50th of September) and
it was fixed in PHP 5. What you are assuming is correct behaviour is
actually a bug.



Relevant Pages

  • Re: [PHP] Re: strtotime
    ... Cette liste est une liste anglaise, reformulent svp votre question en ... PHP General Mailing List ... Probably because strtotime returns null so date thinks that null is equivalent to 0 or something like that AFAIK. ...
  • Nested includes - Relative paths?
    ... I'm relatively new to PHP but I've had some training and feel quite confortable programming it... ... I'm having a problem in understanding the correct behaviour of the include statement/function. ... When PHP processes an include statement does it include the file where the include statement is and then process its contents or does PHP processes the file to be included and only includes it after that? ...