Hi, I am using PHP 4 on my PC, when I am comparing the two objects of same class, I am getting the resultant as true. But, when I am testing the same on the server of the cpwebhosting.net, the objects does not match. Why this is so?
PHP 4 implements === in a different way, comparing the properties of two objects and returning true if all properties match and both objects are instances of the same class. This behavior is quite different in the two versions of PHP, in that two different objects of the same type can have the same properties. In PHP 4, such objects would be held to be equivalent, whereas in PHP 5 the objects would not match.