Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10324 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5832 invoked by uid 1010); 8 Jun 2004 17:47:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5768 invoked from network); 8 Jun 2004 17:47:10 -0000 Received: from unknown (HELO took.shire) (68.126.141.9) by pb1.pair.com with SMTP; 8 Jun 2004 17:47:10 -0000 Received: (qmail 12502 invoked by uid 1001); 8 Jun 2004 17:54:05 -0000 Date: Tue, 8 Jun 2004 17:54:05 +0000 To: internals@lists.php.net Message-ID: <20040608175405.GG55921@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <40C5FA4A.20206@dharana.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40C5FA4A.20206@dharana.net> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] date('w') return type From: curt@php.net (Curt Zirzow) * 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? > > > // 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. string date ( string format [, int timestamp]) 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!