|
Posted by Andy Hassall on 10/12/52 11:39
On 8 Feb 2006 10:54:40 -0800, "Zioth" <google@zioth.com> wrote:
>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?
Nope, AFAIK. You have to go to PHP5.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|