Re: before beta2 (is alive again) :-)

From: Date: Sun, 07 Sep 2003 04:02:54 +0000
Subject: Re: before beta2 (is alive again) :-)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-4421@lists.php.net to get a copy of this message
At 11:03 PM 9/6/2003 +0200, Marcus Börger wrote:
What needs to be discussed ? Typehinting works with NULL values (It's working for me), or am I wrong? The point was that it doesn't make sense for values passed by reference and that maybe someone doesn't want to allow NULL which is IMO the normal case. Because with type hinting you say you want an instance of a certain class and you didn't say something about NULL. The idea was then to allow NULL only if that's the default value.
I think that there is no right way. What I would like to see is: a) Type hints allow the type and null (in objects), i.e. method(MyClass $obj) b) Add an option of writing "not null" to make the type hint not allow null. i.e. method(MyClass $obj not null) Andi

« previous php.internals (#4421) next »