Someone wrote the following php4 code which I now am trying to port to php5:
the class is Foo (name changed to protect the guilty). In one of the methods, we'll call it save() the class apparently is reset like this:
$this = new Foo($this->Foo_Id);
That results in the following error:
( ! ) Fatal error: Cannot re-assign $this in ...
My idea would be to fix it like this, but I am concerned that it might not be the same:
$this->Foo($this->Foo_Id);
PHP doesn't throw the parse/fatal error anymore when I include the class, but like I said, am I going to achieve the same thing as the php4 construct?