Re: RFC for Adding __toString to DateTime
| From: | Pierre Joye | Date: | Mon, 03 Sep 2012 13:10:36 +0000 |
| Subject: | Re: RFC for Adding __toString to DateTime | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62738@lists.php.net to get a copy of this message | ||
hi Lars,
On Mon, Sep 3, 2012 at 2:09 PM, Lars Strojny <lars@strojny.net> wrote:
> Ease debugging by allowing "echo $date;" instead of "echo
> $date->format(...);"
Ooch. If that's the only goal, it makes no sense to add that.
However I see many useful usages like passing date object to templates
and the likes (while tpl system can implement it cleanly too, but it
spares some code duplication all over the apps).
Cheers,
--
Pierre
@pierrejoye