|
Posted by Zioth on 10/11/80 11:39
class A {
function Get() {return $this;}
}
$obj = new A();
In php5, the following statement is valid:
$x = $obj->Get()->Get();
In php4, I get the following error:
parse error, unexpected T_OBJECT_OPERATOR
I know I can do this:
$x = $obj->Get();
$y = $x->Get();
but I'd rather not. Is there a simple, one-line way to do indirect
object references in php4?
And yes, I know my example is silly. My real problem is for more
complicated cases, where multiple classes are involved.
Navigation:
[Reply to this message]
|