On Tue, Dec 07, 2010 at 11:01:09PM +0200, Alexandru Patranescu wrote:

> I know how to do it in other ways.
> I was just wondering why the simple new Object() -> method won't work. new
> operator has precedence over.......
> That must be the problem.  -> is not an operator. Is not in this list:
> http://php.net/manual/en/language.operators.precedence.php
> That must be done. -> should be an operator!

I haven't followed this thread closely, but I see code like this in
CodeIgniter a lot. I don't code like this, but it appears that they only
write this kind of code using already instantiated objects. Here is an
example from their user manual:

$this->db->select('title')->from('mytable')->where('id', $id)->limit(10,

What kind of internal magic they use to make this work, I don't know. I
haven't examined their internals.


Paul M. Foster

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

Reply via email to