|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-30 14:11 UTC] rasmus@php.net
[2002-07-30 14:28 UTC] m dot ford at lmu dot ac dot uk
[2002-07-30 14:45 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
The configure line is: './configure' '--enable-ftp' '--enable-bc-math' '--enable-gd-native-ttf' '--enable-inline-optimization' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-sysvsem' '--enable-sysvshm' '--enable-sockets' '--enable-track-vars' '--enable-trans-sid' '--with-freetype-dir=/usr' '--with-gd=/usr' '--with-imap=/usr' '--with-imlib=/usr' '--with-jpeg-dir=/usr' '--with-kerberos=/usr/kerberos' '--with-mysql=/usr/local/mysql' '--with-openssl=/usr' '--with-png-dir=/usr' '--with-t1lib=/usr' '--with-ttf=/usr' '--with-xml' '--with-xpm-dir=/usr/X11R6' '--with-zlib-dir=/usr' '--with-apache=../apache_1.3.26' '--with-snmp' '--enable-ucd-snmp-hack' I was writing a script that was supposed to determine all the Sundays between an entered date and the current date. I had a loop in which I used "strtotime("next Sunday",$date)". This did not work and just returned the sunday after the current date instead of the Sunday after the timestamp i gave it. I had used an identical expression outside of the loop and it correctly returned the next Sunday of the timestamp i gave it. This script replicates the problem: <? $now=time(); $date=strtotime("November 24, 2002"); while($now<$date) { echo date("l, F j, Y", $now)."<br>"; $now=strtotime("next Sunday", $now); } ?> That loop will never terminate as it logically should.