Re: Passing by reference

From: Date: Tue, 28 Nov 2000 05:07:01 +0000
Subject: Re: Passing by reference
References: 1  Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-39343@lists.php.net to get a copy of this message
Nope hasn't gone in yet. I have a preliminary patch but I'm still not sure if it works (there are semantic problems with it which I might need to bring up on the list too :). I'll get to it today or tomorrow. Andi At 08:55 PM 11/27/00 +0100, André Langhorst wrote:
Please let me know if this solves some of the bugs people have been reporting with the current CVS tree.
As I already told, my testcases all work now :) but there's another problem ... didn't the "$this in constructor"||"new always returns refernce" patch go in? as I added to bug 7454 the following code still doesn't work... andré <?php class foo {
        function foo($name) {
        $GLOBALS['List']= &$this;
        $this->Name = $name;
                $GLOBALS['List']->echoName(); }
        function echoName() {
        echo "<br>".$this->Name; } }
function &foo2(&$foo) {
        return $foo; }
$bar1 = new foo('constructor1'); //$bar1 = foo2(new foo('constructor1')); $bar1->Name = 'outside1'; $bar1->echoName(); $List->echoName(); echo '<P>'; ?> --
· André Langhorst       · t: +49 571 3201801 ·
· waldschrott@php.net · m: +49 173 9558736 · · PHP Quality Assurance · http://qa.php.net ·
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#39343) next »