[PHP] accessing magic parent set

2010-12-22 Thread Alexandru Patranescu
Is this the only way to access the magic __set from the parent class: public function __set($columnName, $value) { if ($value !== $this->$columnName) { parent::__set($columnName, $value); } } I would have liked to work this way: public function __set(

Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread Alexandru Patranescu
They are almost identical. Echo supports multiple parameters like "echo $a, $b;" print is 20% slower than echo (by some tests). "echo" is shorter than "print" so it's easy to write. In fact it's all a matter of taste. The same reason we user die instead of exit. Alex On Sun, Dec 12, 2010 at 6:2

Re: [PHP] ORM doctrine

2010-12-08 Thread Alexandru Patranescu
Doctrine is mature and well I've seen it plenty of times companies using it. Of course it handles multi table joins but I think it's main purpose is not related to users writing joins... It's an ORM, you just read and write objects. Caching is something that must be there and you can read more on

Re: [PHP] new keyword combined with other things...

2010-12-07 Thread Alexandru Patranescu
ust be done. -> should be an operator! Alex On Tue, Dec 7, 2010 at 10:49 PM, Jim Lucas wrote: > On 12/7/2010 7:40 AM, Alexandru Patranescu wrote: > > In many other languages this will work: > > > > *$result = new Object() -> method();* > > > > But in php, it

[PHP] new keyword combined with other things...

2010-12-07 Thread Alexandru Patranescu
In many other languages this will work: *$result = new Object() -> method();* But in php, it fails at parsing. I've tried with parenthesis around new but nothing. Anyhow, as I saw later, *new* operator has precedence over others so this couldn't be a solution. I know a static function can be defi