On Fri, 2008-04-18 at 11:42 -0700, Stanislav Malyshev wrote:
> Hi!
>
> > $result = new myObject -> myMethod();
> >
> > Is there a technical reason as to why this can't be done? If not can
> > this be changed?
>
> I think this can not be parsed unambiguously. This could be new
> (expression with
Hi!
$result = new myObject -> myMethod();
Is there a technical reason as to why this can't be done? If not can
this be changed?
I think this can not be parsed unambiguously. This could be new
(expression with ->) or (new expression)->expression. E.g., what this means:
$a = new $foo->bar();
I had a question about object instantiation.
You can do this:
function createObject() {
return new myObject;
}
$result = createObject() -> myMethod();
But you can't do this:
$result = new myObject -> myMethod();
Is there a technical reaosn as to why this can't be done? If not can
this