Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26497 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57555 invoked by uid 1010); 10 Nov 2006 22:47:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57540 invoked from network); 10 Nov 2006 22:47:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 22:47:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 81.169.182.136 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from [81.169.182.136] ([81.169.182.136:56689] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/B1-27611-B8105554 for ; Fri, 10 Nov 2006 17:47:39 -0500 Received: from baumbart.mbo (dslb-084-063-045-138.pools.arcor-ip.net [84.63.45.138]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 779FB61028C; Fri, 10 Nov 2006 23:47:36 +0100 (CET) Date: Fri, 10 Nov 2006 23:48:28 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1452700798.20061110234828@marcus-boerger.de> To: Dmitry Shirokov Cc: internals@lists.php.net In-Reply-To: <7c3b2950611091321y649266abs4f3a5bac7187e889@mail.gmail.com> References: <7c3b2950611091321y649266abs4f3a5bac7187e889@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Feature request From: helly@php.net (Marcus Boerger) Hello Dmitry, the major problem here is that people have a wrong understanding of what it would do. Without return by reference it creates copies which not only makes assignments useless but also read code very slow. To overcome this, we would need to discuss another error message's fate/severity and live with yet another hard to understand, pretty much misleading feature. best regards marcus Thursday, November 9, 2006, 10:21:45 PM, you wrote: > Hey guys. > What are you thinking about adding this feature: > function foo() > { > return array(1,2,3,4,5,6); > } > echo foo()[4]; // <---- it that > // or may be (foo())[4] ? > // instead of > $var = foo(); > echo $var[4]; ?>> Best regards, Marcus