Oh God, please hurry and release a stable PHP with Zend 2.0!!  I &$hate
&$this &$bs &$and &$can't get it to work &$at &$all!

Thank you,
Greg

P.S. If any one of you has figured out how to do this:
<?php
class a
{
    var $parent;
    function a(&$b)
    {
        $this->parent = &$b;
    }
}

class b
{
    var $as;
    var $parent;
    function b(&$c)
    {
        $this->parent = &$c;
        for($i=0;$i<5;$i++)
        {
            $this->as[$i] = &new a($this);
        }
    }
}

class c
{
    var $bs;
    var $test;
    function c()
    {
        for($i=0;$i<5;$i++)
        {
            $this->bs[$i] = &new b($this);
        }
    }
}
$foo = &new c();
$foo->test = 1;
$foo->bs[3]->cs[2]->parent->parent->test = 5;
print $foo->test."<br>";
print $foo->bs[3]->cs[2]->parent->parent->test;
// output:
// 1
// 5
// and should be:
// 5
// 5
?>

let me know *please*.  I have 3 objects, form, table, and field for database
abstraction that need this linking.
--
The Chiara String Quartet
http://www.chiaraquartet.net


"Zeev Suraski" <[EMAIL PROTECTED]> wrote in message
5.1.0.14.2.20010829144246.03ae7618@localhost">news:5.1.0.14.2.20010829144246.03ae7618@localhost...
> If I didn't know you're not working for Zend, I'd suspect that was a
> prepared-question :)
>
> http://www.zend.com/engine2/ZendEngine-2.0.pdf
>
> At 11:26 29-08-01, Geoff Caplan wrote:
> >Hi folks
> >
> >While we are on the subject of strategic issues for PHP, a quick question
on
> >the OOP functionality.
> >
> >As many on this list will know, there is a peculiarity with the PHP
object
> >model - in many situations it creates a copy of an instance when you
would
> >expect a reference. This means that you have to constantly remember to
> >create references with &, adding an extra source of hard-to-find bugs.
> >
> >Are there any plans to sort this out? It rather disfigures the language.
> >
> >Yes, I know PHP was conceived as a functional language, but a high
> >percentage of the more sophisticated applications make use of its object
> >functionality - you just have to look at the script download sites to see
> >that this is true. Both Perl and C/C++ are examples of successful hybrid
> >languages. With just a little extra work, PHP could join this list...
> >
> >Geoff Caplan
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Zeev Suraski <[EMAIL PROTECTED]>
> CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to