Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9472 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35760 invoked by uid 1010); 21 Apr 2004 23:21:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35736 invoked from network); 21 Apr 2004 23:21:21 -0000 Received: from unknown (HELO shiva.mind.de) (212.42.230.204) by pb1.pair.com with SMTP; 21 Apr 2004 23:21:21 -0000 Received: from [192.168.1.3] (pD95F85E5.dip.t-dialin.net [217.95.133.229]) by shiva.mind.de (Postfix) with ESMTP id 6B6B397B58; Thu, 22 Apr 2004 01:21:20 +0200 (CEST) Date: Thu, 22 Apr 2004 01:21:24 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <301310960187.20040422012124@marcus-boerger.de> To: Andi Gutmans Cc: Christian Schneider , internals@lists.php.net, Zeev@zend.com In-Reply-To: <5.1.0.14.2.20040421132348.03380a38@127.0.0.1> References: <1921263076812.20040421120321@marcus-boerger.de> <1921263076812.20040421120321@marcus-boerger.de> <5.1.0.14.2.20040421132348.03380a38@127.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: typehinting and NULL From: helly@php.net (Marcus Boerger) 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