Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22983 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79410 invoked by uid 1010); 26 Apr 2006 22:36:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79395 invoked from network); 26 Apr 2006 22:36:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2006 22:36:27 -0000 X-PHP-List-Original-Sender: brianm@dealnews.com X-Host-Fingerprint: 129.41.69.185 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from ([129.41.69.185:60049] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B6/36-19715-BE5FF444 for ; Wed, 26 Apr 2006 18:36:27 -0400 Received: (qmail 18023 invoked from network); 26 Apr 2006 18:36:21 -0400 Received: from unknown (HELO ?10.1.6.4?) (10.1.6.4) by 10.1.1.24 with SMTP; 26 Apr 2006 18:36:21 -0400 Message-ID: <444FF5CD.2010805@dealnews.com> Date: Wed, 26 Apr 2006 17:35:57 -0500 User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060406) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Passing functions to function by reference From: brianm@dealnews.com (Brian Moon) In PHP4, you could do: function test() { return array(1,2,3); } $var = array_shift(test()); PHP 5.0 broke this. There was a fatal error on the array_shift that only variables could be passed by reference. There was a good argument for it. So, we started migrating our code. Well, seems this works in 5.1. So, my question is, was it an intentional "fix" or will this break again and we need to continue to watch for this? Brian.