date('w') return type
| From: | dharana | Date: | Tue, 08 Jun 2004 17:41:30 +0000 |
| Subject: | date('w') return type | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-10323@lists.php.net to get a copy of this message | ||
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.
Btw, I don't hope it will be changed because it would probably break a
lot of scripts.
--
Juan Alonso
This message represents the official view of the voices in my head