From: "James Moore" <[EMAIL PROTECTED]>
> untested but..
>
> > $foo = ${$test->blah()}[0];
>
> > // Similarly for objects, cannot do:
> > $foo = $test->childTest()->blah();
>
> $foo = ${$test->childTest()}->blah();
>
Nope, I tried that :)
> > // Instead have to do:
> > $temp = $test->childTe
untested but..
> $foo = ${$test->blah()}[0];
> // Similarly for objects, cannot do:
> $foo = $test->childTest()->blah();
$foo = ${$test->childTest()}->blah();
> // Instead have to do:
> $temp = $test->childTest();
> $foo = $temp->blah();
Might work.. never had need to test it and cant be both
I posted this to the Manual notes the other day, but I thought I'd repost it
here for discussion. :)
It seems there is no way to access the return value of a method (or any
function) inline, without assigning it to a variable.
For example:
class Test
{
function blah ()
{
ret
3 matches
Mail list logo