Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98435 invoked by uid 1010); 17 Oct 2004 14:40:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98347 invoked from network); 17 Oct 2004 14:40:46 -0000 Received: from unknown (HELO malcolm.ailis.de) (217.115.149.166) by pb1.pair.com with SMTP; 17 Oct 2004 14:40:46 -0000 Received: (qmail 26279 invoked by uid 64014); 17 Oct 2004 14:41:39 -0000 Received: from pd95fabd3.dip.t-dialin.net (HELO ?192.168.36.100?) (k@217.95.171.211) by malcolm.ailis.de with SMTP; 17 Oct 2004 14:41:38 -0000 Message-ID: <4172843B.9040300@ailis.de> Date: Sun, 17 Oct 2004 16:39:55 +0200 User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS 0.3.12 Subject: array(...)[] From: k-php-dev@ailis.de (Klaus Reimer) Hi, I've just seen that finally it's possible to do "$object->getOtherObject()->doSomething()" with PHP5 which was not possible in PHP4. But I wonder why something like this still does not work: $object->returnArray()[$index] returnArray()[$index] array(1,2,3,4)[$index] It would be really cool if a future version of PHP understands the above syntax because currently it's really annoying to access an array element returned from a method/function because the return value must be stored in a temporary variable before it is possible to access elements from that array. Bye K