Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71145 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21805 invoked from network); 15 Jan 2014 19:24:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2014 19:24:42 -0000 Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:44519] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/65-26701-770E6D25 for ; Wed, 15 Jan 2014 14:24:41 -0500 Received: (qmail 28109 invoked from network); 15 Jan 2014 20:24:36 +0100 Received: from heim-032-99.raab-heim.uni-linz.ac.at (HELO RoLaptop) (193.171.32.99) by ns73.kreativmedia.ch with (AES128-SHA encrypted) SMTP; 15 Jan 2014 20:24:36 +0100 To: "'Philip Sturgeon'" , References: In-Reply-To: Date: Wed, 15 Jan 2014 20:24:35 +0100 Message-ID: <001301cf1227$6d082ab0$47188010$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGahXeLh/KZbd8XAeJ9KP0Xitay+JrvOcaA Content-Language: de-ch Subject: RE: [PHP-DEV] Introducing "Array Of" RFC From: php@tutteli.ch ("Robert Stoll") Hey, > -----Original Message----- > From: Philip Sturgeon [mailto:pjsturgeon@gmail.com] > Sent: Wednesday, January 15, 2014 7:18 PM > To: internals@lists.php.net > Subject: [PHP-DEV] Introducing "Array Of" RFC > > Hey, > > This is my first RFC so give me a little leeway if I get things wrong. > > https://wiki.php.net/rfc/arrayof > > The implementation has been written by Joe Watkins, and I will be > handling the RFC process for him. > > It is aimed at PHP 5.6, and so far the release managers seem to be ok > with the idea of this potentially being merged after the alpha > release, so this should not be considered an issue. > > Everything is open for discussion, especially the current error > messages. They are not perfect, so let us know if you have better > ideas. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php First of all, I really like the RFC, good idea, well done. But about some details. I am not sure if I got the implementation right (haven't done any code contributions so far, so I am not really familiar with the source code) but it seems that a check for NULL is implemented for the actual parameter which is perfectly fine (done for other type hints as well) but it also checks if all members of an array are not NULL and the check returns a failure if NULL is detected. I think that's wrong, NULL is a perfect valid entry in an array. Furthermore, what about type hints like the following ones: function foo(int[] $qualities, callable[] $callables){} Seems like they are not supported. But might be that I am totally wrong and did not understand the code