functions returning references to function calls

From: Date: Fri, 01 Aug 2003 12:33:30 +0000
Subject: functions returning references to function calls
Groups: php.internals 
Request: Send a blank email to internals+get-3679@lists.php.net to get a copy of this message
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.

« previous php.internals (#3679) next »