Results 1 to 13 of 13
Thread: PHP5 objects references question
Jul 16, 2005, 01:30 #1
- Join Date
- Mar 2004
- Russia, Penza
- 0 Post(s)
- 0 Thread(s)
PHP5 objects references question
After reading last php|architect article about PHP internal implementation of references i still feel that there's one issue left unspoken. That is PHP5 objects internal model. It's obvious they're not just variables...
How are they implemented actually?
Consider the following lines in PHP5:
$a = new Foo(); $b = $a;
Is it equivalent internally in PHP5 to this:
$a = new Foo(); $b =& $a;
If not what the difference? Is it actually "healthy" to use & with objects in PHP5? Is there speed overhead?
I'm asking all these questions because we're using PHP5 with applications which were written solely for PHP4 yet using OOP. These applications use & almost everywhere and i wonder how PHP5 treats it internally....
P.S. I addressed the same question to the original author(Derrick Rethans) of this article but being a busy guy(i guess) he didn't respond...