#43745 [Opn->WFx]: Scalar type hinting
| From: | helly@php.net | Date: | Fri, 04 Jan 2008 15:09:13 +0000 |
| Subject: | #43745 [Opn->WFx]: Scalar type hinting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121035@lists.php.net to get a copy of this message | ||
ID: 43745
Updated by: helly@php.net
Reported By: sam at sambarrow dot com
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
-Operating System: Ubuntu Linux 7.04
+Operating System: *
-PHP Version: 5.3CVS-2008-01-04 (CVS)
+PHP Version: *
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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