Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3679 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58419 invoked from network); 1 Aug 2003 12:31:54 -0000 Received: from unknown (HELO bugge.potatoe.com) (216.240.48.15) by pb1.pair.com with SMTP; 1 Aug 2003 12:31:54 -0000 Received: from potatoe.com (localhost [127.0.0.1]) by bugge.potatoe.com (8.12.9/8.12.2) with ESMTP id h71CXUaF009120; Fri, 1 Aug 2003 05:33:31 -0700 (PDT) Message-ID: <3F2A5E1A.9060500@potatoe.com> Date: Fri, 01 Aug 2003 05:33:30 -0700 Organization: The Madfish Group User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030727 Thunderbird/0.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net CC: alan@akbkhome.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: functions returning references to function calls From: tater@potatoe.com (Brad Bulger) Hello. I found in PEAR DB class something that seemed like small BC issue. The package maintainer thought it sounded like bug. If anyone would comment? function &foo() { return new barclass; } gives error saying PHP Fatal error: Only variables or references can be returned by reference this is correct for php 5, yes? same as function &foo() { $a = array(1); return array_keys($a); } which gives same error in 5, but is acceptable in 4. Thank you.