ID: 29877 Updated by: [EMAIL PROTECTED] Reported By: bharat at menalto dot com Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD 4.8 PHP Version: 4CVS, 5CVS (2004-12-10) New Comment:
Note: Tested with 4.2.2 and it works exactly the same. IMO this is not a bug. Previous Comments: ------------------------------------------------------------------------ [2004-08-28 22:56:41] bharat at menalto dot com Description: ------------ According to the documentation here: http://us4.php.net/manual/en/language.references.return.php In order to assign a variable as a reference to a value returned by a class method, the method needs to also return by reference. However, on PHP 4.3.8 in my test script I've found that the semantics are the same whether or not you return by reference. This is surprising to me. I could have sworn that it didn't used to be this way. Please let me know if you need more information. I can reproduce this with a stock php.ini. If this is the desired behaviour in this case, then we should update the documentation to reflect that the ampersand is no longer necessary on the getter method. Reproduce code: --------------- http://www.menalto.com/.outgoing/php/ref.php Expected result: ---------------- The URL above indicates the expected results. I can elaborate if necessary. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29877&edit=1
