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  <[EMAIL PROTECTED]>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to