Re: [RFC] Strict type hints (parameter and return value)
| From: | Sam Barrow | Date: | Thu, 17 Apr 2008 15:58:27 +0000 |
| Subject: | Re: [RFC] Strict type hints (parameter and return value) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37077@lists.php.net to get a copy of this message | ||
In this case, I'd suggest using my patch for parameter type hinting. It
utilizes the current type hinting system for minimal code changes,
whereas this is a whole new set of functionality. It also has scalar and
number types, and supports objects with __tostring methods.
On Thu, 2008-04-17 at 11:42 -0300, Felipe Pena wrote:
> Hi.
>
> Well, thinking better about the behavior of type hinting, i decided to
> change the proposal for strict type. I.e. don't accept numeric string
> as an intenger, etc.
>
> If anyone wants use type hinting, i believe that it should be strict.
> Otherwise, it makes more sense to not use it.
>
> Examples, patches and tests: http://wiki.php.net/rfc/typehint
>
>
> --
> Regards,
> Felipe Pena.
>