I have the foll prog
class Person {
var $name;
function Person () {
}
}
$fred = new Person;
$fred->name = "Fred";
$barney =& new Person;
$barney->name = "Barney";
echo $barney->name;
echo $fred->name;
both the echo statements give the right same output ie “Fred” and “Barney” so whats the use of giving & while declaring $barney. what does “&” refer to here?
THanks
See References Explained in the PHP Manual.
Is there any particular reason why you are still using PHP4? It is no longer supported and PHP5s OOP is much more solid and capable.