#29400 [Fbk->NoF]: object is no being passed by reference to reference defined method

From: Date: Tue, 21 Dec 2004 06:42:40 +0000
Subject: #29400 [Fbk->NoF]: object is no being passed by reference to reference defined method
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70783@lists.php.net to get a copy of this message
ID: 29400 Updated by: sniper@php.net Reported By: marcelo at beteltecnologia dot com dot br -Status: Feedback +Status: No Feedback Bug Type: Class/Object related Operating System: Windows XP PHP Version: 4.3.8 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2004-12-13 07:32:25] sniper@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2004-07-26 23:49:33] marcelo at beteltecnologia dot com dot br Description: ------------ I have a method that receives a object by reference. Despite the method definition defines that the parameter should be taken by reference it is being treated as it were a copy. Reproduce code: --------------- class Myclass extends MyOtherClass { function mymethod(&$myobj) { $myobj->mymodifier('Parameter'); } } Expected result: ---------------- the 'mymodifier' method of the original 'myobj' object should be called. Actual result: -------------- PHP is calling the method 'mymofifier' for a copy of the instance of 'myobj'. I used Call-time pass-by reference, to avoid the problem but, since this technique is deprecated I am reporting the bug. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29400&edit=1

« previous php.bugs (#70783) next »