Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27359 invoked by uid 1010); 21 Apr 2004 10:28:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27322 invoked from network); 21 Apr 2004 10:28:38 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 21 Apr 2004 10:28:38 -0000 Received: (qmail 14300 invoked from network); 21 Apr 2004 10:28:32 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 21 Apr 2004 10:28:32 -0000 Message-ID: <5.1.0.14.2.20040421132348.03380a38@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 21 Apr 2004 13:25:15 +0300 To: Christian Schneider , Marcus Boerger Cc: internals@lists.php.net,Zeev@zend.com In-Reply-To: <408649A5.3070307@cschneid.com> References: <1921263076812.20040421120321@marcus-boerger.de> <1921263076812.20040421120321@marcus-boerger.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: typehinting and NULL From: andi@zend.com (Andi Gutmans) 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