At 02:14 PM 5/9/2004 +0300, Stanislav Malyshev wrote:
AG>>I think it makes sense not to allow default initialization of non-NULL
AG>>values when there's a class type hint.

Having this, do we actually need both "= null" and "nullable" keyword?
They seem to be almost the same meaning, though not exactly - you can say
'nullable' on first parameter of two-parameter function, while you
couldn't - at least, until now - say '= null' for it.

I don't quite understand. = NULL is if you want to suggest that this parameter is optional (default value). nullable is if you want the typehint to not error out if null is passed for the object. I think these two are two different things and should have different syntax.
Maybe I misunderstood what you're saying.
Andi


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to