Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13629 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98211 invoked by uid 1010); 30 Oct 2004 06:49:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98186 invoked from network); 30 Oct 2004 06:49:17 -0000 Received: from unknown (HELO bobsilva.com) (198.237.84.92) by pb1.pair.com with SMTP; 30 Oct 2004 06:49:17 -0000 Received: from [198.237.84.90] (account me HELO salty) by bobsilva.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 471434 for internals@lists.php.net; Fri, 29 Oct 2004 23:08:15 -0700 To: Date: Fri, 29 Oct 2004 23:49:36 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Thread-Index: AcS+TJ8O1XP3lFclRtiWMsgfQEA8WA== Message-ID: Subject: PHP 5.1 Roadmap -- Type hints From: junkmail@bobsilva.com ("Robert Silva") Just in case anyone lost track... it seems the consensus is to allow the optional parameter syntax for class hints. The Nullable class hint doesn't seem to be well supported among the purists so the optional param syntax, while not optimal, is better than leaving it as it is now. One can always rearrange their parameters to support this method. Not gonna bother with a patch file, something to the effect of... Line 1219 of zend_compile.c + if (op == ZEND_RECV_INIT) { + cur_arg_info->allow_null = 1; + } else { cur_arg_info->allow_null = 0; + } No need to check/force NULL as the initializer, the runtime zend_verify_arg_type handles that check. BC isn't an issue since this syntax was a runtime error in 5.0. It would be nice to see this in 5.1. Bob Silva