#43745 [WFx->Sus]: Scalar type hinting
| From: | pajoye@php.net | Date: | Fri, 04 Jan 2008 15:46:15 +0000 |
| Subject: | #43745 [WFx->Sus]: Scalar type hinting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121036@lists.php.net to get a copy of this message | ||
ID: 43745
Updated by: pajoye@php.net
Reported By: sam at sambarrow dot com
-Status: Wont fix
+Status: Suspended
Bug Type: Feature/Change Request
Operating System: *
PHP Version: *
New Comment:
won't fix > suspended.
There is a discussion about such features and no, it is not yet done.
Previous Comments:
------------------------------------------------------------------------
[2008-01-04 15:09:13] helly@php.net
We will not implement scalar type hints.
Check the archives on the exact why.
For pure hinting you can use pecl/SPL_Types which will act like Java
autoboxing.
------------------------------------------------------------------------
[2008-01-04 04:51:27] sam at sambarrow dot com
Description:
------------
Requesting support for scalar type hinting. I have a fully working
patch written, I have been using it myself with no problems for a couple
of months.
Full specs:
Type hinting patch allows for 8 new type hints, in addition to array
and class type hinting.
- Integers (specified by "int", "integer", or "long")
- Floats (specified by "float", "double", or "real")
- Numbers (matches integers and floats, specified by "num" or
"number")
- Strings (specified by "string")
- Booleans (specified by "bool" or "boolean")
- Scalars (matches strings, booleans, and numbers; specified by
"scalar")
- Resources (specified by "resource")
- Objects (matches any object, specified by "object")
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43745&edit=1