Originally posted by planetsim
It seems there showing the PHP 4 Zend 1 Engine so its more of an example of referencing with global's and statics.
For which in PHP5 is the static keyword; static methods and properties (those that belong to the class and not to the objects that instantiate it - and not to be confused with static variables in ordinary functions) would be called as classname::methodname() or classname::$propertyname.
As for whether it would take "more time" or not - it wouldn't in PHP4 or 5. PHP 4's memory allocation uses copy-on-write. Saying
$foo = $bar;
will (from the PHP programmer's perspective) copy the value of $bar into $foo. But internally all that happens is that the pointer data contained in $bar's entry in the symbol table is copied to $foo's entry. In other words, a new entry labelled $foo is created (or an existing one is rewritten) that points to the same data that the entry labelled $bar points to.
Actually copying the data doesn't occur unless and until the data itself is altered. Then a new (altered) copy is created somewhere in memory, and the appropriate symbol entry is pointed to that.
Consider:
$a = [some multi-megabyte structure - an array containing the lines of some big wodge of text, say];
$b = $a;
Although it's now being "stored in two variables", at this point the array still only exists in one place in memory, and both $b and $a point to it. If a value was copied every time a variable was said to have it, there would now be two copies of the array, taking up twice as much memory, and the assignment would have taken significantly longer to complete.
Needless to say, the same goes for version 5. Either way, the only difference between using & or not is whether the actual copy-on-write step itself should be skipped or not when either variables's value changes.