Re: date('w') return type

From: Date: Tue, 08 Jun 2004 17:54:05 +0000
Subject: Re: date('w') return type
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-10324@lists.php.net to get a copy of this message
* Thus wrote dharana (dharana@dharana.net): > I know I can just cast to int, but is it ok to return an string for > things that can only be numbers? > > > <?php > // imagine today is sunday > var_export(date('w') === 0); > ?> > > prints false, but I expected it to return an int. Am I wrong? I imagine > it's the same thing with the rest of date's return values. <manual> string date ( string format [, int timestamp]) </manual> Looks like it returns a string. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!

« previous php.internals (#10324) next »