Re: date('w') return type
| From: | Hartmut Holzgraefe | Date: | Thu, 10 Jun 2004 10:32:59 +0000 |
| Subject: | Re: date('w') return type | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-10375@lists.php.net to get a copy of this message | ||
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? -- Hartmut Holzgraefe <hartmut@php.net>