Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-2007, 04:09 AM
Junior Member
 
Join Date: May 2007
Posts: 2
Default Objects Match on local PC but not on server

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?
Reply With Quote
  #2 (permalink)  
Old 06-22-2007, 04:13 AM
Junior Member
 
Join Date: Mar 2007
Posts: 3
Default

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:15 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0