Re: Re: typehinting and NULL

From: Date: Wed, 21 Apr 2004 23:21:24 +0000
Subject: Re: Re: typehinting and NULL
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-9472@lists.php.net to get a copy of this message
Hello Andi, sounds like a great idea, maybe even the best one. marcus Wednesday, April 21, 2004, 12:25:15 PM, you wrote: > I wanted to support: > function preventNULL($val not NULL) > function allowNULL($val) > However, I left it for after 5.0.0 due to the feature freeze. Note, that it > will also not change today's semantics. > Andi > At 12:15 PM 4/21/2004 +0200, Christian Schneider wrote: >>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 -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#9472) next »