How comparison of objects is done in PHP5?
please give me answer of this quetion
|
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!
|
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.