Welcome Guest, Not a member yet? Register   Sign In
Escaping the trademark symbol with MySQL
#14

[eluser]TWP Marketing[/eluser]
Fuzzyone,
I was not aware of the deprecation. That change seems to make no sense. I'll have to do some research because I want the benefit of using only one instance of a var. PITS!
but thanks for the info.

UPDATE: I did some research, here: http://devzone.zend.com/article/1714-Whats-New-in-PHP-5
which states:

Quote:"This behavior is not very intuitive, as many developers would expect the Java-like behavior. In Java variables actually hold a handle (or pointers) to the object, and therefore, when it is copied only the handle and not the entire object is duplicated.
There were two kinds of users in PHP 4, the ones who were aware of this problem and the ones who weren't. The latter would usually not notice this problem and their code was written in a way where it didn't really matter if the problem existed or not. Surely some of these people had sleepless nights trying to track down weird bugs which they couldn't pinpoint. The former group dealt with this problem by always passing and assigning objects by reference. This would prevent the engine from copying their objects but would be quite a headache as the code included numerous & signs.

The old object model not only led to the above-mentioned problems but also led to fundamental problems that prevented implementing some additional features on top of the existing object model.

In PHP 5, the infrastructure of the object model was rewritten to work with object handles. Unless you explicitly clone an object by using the clone keyword you will never create behind the scene duplicates of your objects. In PHP 5, there is neither a need to pass objects by reference nor assigning them by reference.

Note: Passing by reference and assigning by reference is still supported, in case you want to actually change a variable's content (whether object or other type)."

TWP: Note the 'Note:' at the end. This is precisely the need I have. That being said, I am using PHP5 and don't face the problem of having to force my code to run under PHP4, EXCEPT when I deal with CI related programming... It's the exceptions to the rule that bite you every time. Thanks again for making me aware of this whole situation.


Messages In This Thread
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 03:39 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:03 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:17 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:47 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:53 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 04:58 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:07 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:11 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:12 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:17 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 05:39 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-04-2009, 06:00 PM
Escaping the trademark symbol with MySQL - by El Forum - 03-05-2009, 03:37 AM
Escaping the trademark symbol with MySQL - by El Forum - 03-05-2009, 12:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB