ID:               43745
 Comment by:       alll-developers at php dot world
 Reported By:      sam at sambarrow dot com
 Status:           Suspended
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      *
 New Comment:

Why won't these type hintings be implemented?
For me and every serious PHP Developer in the world it would be so cool
to have that feature


Previous Comments:
------------------------------------------------------------------------

[2008-01-04 15:46:15] paj...@php.net

won't fix > suspended.


There is a discussion about such features and no, it is not yet done.

------------------------------------------------------------------------

[2008-01-04 15:09:13] he...@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

Reply via email to