Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   PHP / mySQL (http://siteownersforums.com/forumdisplay.php?f=10)
-   -   How comparison of objects is done in PHP5? (http://siteownersforums.com/showthread.php?t=178459)

Aman897 09-29-2016 04:24 AM

How comparison of objects is done in PHP5?
 
please give me answer of this quetion

sjaslow 10-01-2016 01:37 PM

Depends on which operator you use. Double-equals (==) will return true if the classes and fields are equal. Identity operator (===) return true if the operands are the same exact instance. Good luck!

btsoft 05-18-2017 12:58 AM

We use the operator ‘==’ to test is two object are instanced from the same class and have same attributes and equal values. We can test if two object are refering to the same instance of the same class by the use of the identity operator ‘===’.


All times are GMT -7. The time now is 03:49 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.