Using php4 object references in php5
Posted: Wed Nov 14, 2007 10:38 am
I have a site that was built in php4. I've recently moved to a server running php5, and haven't noticed many problems until today. Then I ran into an issue where I was making a copy of an object like this:
This works in php4, but in php5 it has to be
That change fixed the issue with no problem, but now I am worried that there are other things that aren't working that I just haven't found yet. This site is finished. I don't plan to add new features to it, so I'd like to just be confident that it's all working without upgrading everything to PHP5's OOP model.
So the question I is:
Is it possible to tell php5 to use the php4 OOP model instead? Maybe something like:
That would make my life a lot easier right now. I appreciate any help anyone can offer.
Code: Select all
$copy = $objectCode: Select all
$copy = clone $objectThat change fixed the issue with no problem, but now I am worried that there are other things that aren't working that I just haven't found yet. This site is finished. I don't plan to add new features to it, so I'd like to just be confident that it's all working without upgrading everything to PHP5's OOP model.
So the question I is:
Is it possible to tell php5 to use the php4 OOP model instead? Maybe something like:
Code: Select all
ini_set("object_model", 4)