Re: [PATCH] Optional scalar type hinting
| From: | Marcus Boerger | Date: | Mon, 19 Nov 2007 16:27:51 +0000 |
| Subject: | Re: [PATCH] Optional scalar type hinting | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33322@lists.php.net to get a copy of this message | ||
Hello Sam,
since the thread turned to autoboxing. You guys may want to have a look at
Pecl/SPL_Types which provides the base functionality to implement autoboxing
already. Right now it provides only a Bool and an Enum class though.
marcus
Thursday, November 15, 2007, 4:27:17 PM, you wrote:
> I found a patch by Derick online to allow for scalar type hinting, and
> made it work with the newest snapshot of PHP 5.3. I also added the
> ability to type hint for resources. I would like to ask that it be added
> to the next PHP release. It allows type hinting for int, float, bool,
> string, resource, and object, I also added the ability to use the
> secondary keywords for all of these types (such as double, real, long,
> etc.).
> It will maintain 100% backwards compatibility, as the type hinting is
> 100% optional, implemented in the same way as array/class type hinting.
> I have the patch on my PC, please let me know where and when i can
> submit it. I'd be happy to do the patching and submission myself, just
> asking for permission here.
Best regards,
Marcus