ID: 24477 User updated by: karl at karlaustin dot com Reported By: karl at karlaustin dot com Status: Verified Bug Type: Zend Engine 2 problem Operating System: Solaris 8 & 9 PHP Version: 4.3.2 New Comment:
Well from the text of that item it would suggest that doing: return new object(); is fine, but: return (new object()); is not fine, that's how it would seem to me as an end user. PEAR is ridled with returns like the one I list (Although IMHO it should have only one return and assign return values to a variable then return at the end, but that's another story). Previous Comments: ------------------------------------------------------------------------ [2003-07-03 06:17:54] [EMAIL PROTECTED] Cause: http://news.php.net/article.php?group=php.zend-engine.cvs&article=1432 I wonder if we really should break BC here... ------------------------------------------------------------------------ [2003-07-03 06:13:42] karl at karlaustin dot com Description: ------------ Fatal error: Only variables or references can be returned by reference in /usr/local/php5/lib/php/DB/common.php on line 737 If seems that doing: return new DB_result($this, $result); in a function results in the above error, but: $_tmp = new DB_result($this, $result); return $_tmp; Is fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24477&edit=1