Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77881 invoked by uid 1010); 5 Feb 2007 17:51:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 77866 invoked from network); 5 Feb 2007 17:51:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2007 17:51:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:23896] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/90-61367-B8E67C54 for ; Mon, 05 Feb 2007 12:51:09 -0500 Received: (qmail 25648 invoked from network); 5 Feb 2007 17:49:26 -0000 Received: from office.zend.office (HELO ?127.0.0.1?) (192.168.16.109) by internal.zend.office with SMTP; 5 Feb 2007 17:49:26 -0000 Message-ID: <45C76E09.1080300@zend.com> Date: Mon, 05 Feb 2007 09:48:57 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: Sebastian Bergmann CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Object[] type hint From: stas@zend.com (Stanislav Malyshev) > class Example > { > public function doSomething(Object[] $objects) And how this would be verified - each time by passing whole array and checking each element is an object? I don't think it's a good idea. Also, PHP doesn't have [] as array definition (at least not until Andi's idea is accepted), only as array resolution, so this syntax is also illogical, moreover, it gives you and idea that you could define types using [], which you can not. -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/