Re: Method chaining off constructors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The 'new' keyword has to apply to the object created in the constructor (and
> not the return value of any of the follow-up calls.)   To establish this
> precedence, chaining wasn't  allowed on constructors.

If precedence was the issue, why doesn't this work, either:

(new bob())->one()->two()

?  Or, rather, why couldn't that have been taken into consideration?

thnx,
Christoph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux