Posted by Willem Bogaerts on 10/01/07 13:41
(new Object())->function()
Mtr wrote:
> this results in "unexpected T_OBJECT_OPERATOR" Parse error
>
> How do I do this, without needing two lines such as
>
> $o = new Object();
> $o->function();
>
> Also, what does "unexpected T_OBJECT_OPERATOR" mean?
It means that the -> is unexpected at that point.
Best regards,
--
Willem Bogaerts
Application smith
Kratz B.V.
http://www.kratz.nl/
Navigation:
[Reply to this message]
|