I am porting some code where an object will have methods that return other objects. When I do something like:
$a->b()->c();
PHP 4.0.5 returns parse error. When I write:
$temp = $a->b();
$temp->c();
it works.
I would really want to do it in one line, because I do not want to include a lot of temporary variables.
I tried many methods such as using ($a->b())->c(); but no luck. Could someone teach me how to write it in one line (if possible at all) without using a temporary variable?
Regards
Peter Kwan