Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64229 invoked by uid 1010); 10 Jun 2004 12:00:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 63982 invoked from network); 10 Jun 2004 12:00:10 -0000 Received: from unknown (HELO dharana.net) (217.172.66.21) by pb1.pair.com with SMTP; 10 Jun 2004 12:00:10 -0000 Received: (qmail 13239 invoked from network); 10 Jun 2004 11:59:58 -0000 Received: from unknown (HELO ?127.0.0.1?) (212.106.246.168) by 192.168.0.21 with SMTP; 10 Jun 2004 11:59:58 -0000 Message-ID: <40C84D3C.4030704@dharana.net> Date: Thu, 10 Jun 2004 13:59:56 +0200 User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hartmut@php-groupies.de CC: internals@lists.php.net References: <40C5FA4A.20206@dharana.net> <40C838DB.10301@php.net> In-Reply-To: <40C838DB.10301@php.net> X-Enigmail-Version: 0.84.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-DCC: : X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on magma X-Spam-Level: X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL autolearn=no version=2.63 Subject: Re: [PHP-DEV] date('w') return type From: dharana@dharana.net (dharana) I think I just smoked something illegal before posting that question. The brain damage seems to be gone, sorry for the spam. It just did made sense at that moment. Hartmut Holzgraefe wrote: > dharana wrote: > >> I know I can just cast to int, but is it ok to return an string for >> things that can only be numbers? > > > The date() and strftime() functions are expected to always return > strings, no matter what the format string looks like. > The same holds true for sprintf(), you wouldn't expect > > sprintf("%d", 42) > > to return an int, would you? > -- Juan Alonso This message represents the official view of the voices in my head