Re: Object[] type hint

From: Date: Mon, 05 Feb 2007 17:48:57 +0000
Subject: Re: Object[] type hint
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-27811@lists.php.net to get a copy of this message
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/

« previous php.internals (#27811) next »