Re: typehinting and NULL

From: Date: Wed, 21 Apr 2004 10:15:01 +0000
Subject: Re: typehinting and NULL
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-9452@lists.php.net to get a copy of this message
Marcus Boerger wrote:
function allowingNULL(object $val = NULL) function preventNULL(object $val)
I like this idea even though it's abusing the default value syntax. What's a bit weird is something like function foo(object $obj = NULL, $mandatoryparameter) { ... } where people will wonder why there is a default value even though they can't omit the parameter really. But personally I could live with that. - Chris

« previous php.internals (#9452) next »