09-29-2016, 04:24 AM | #1 |
Registered User
Join Date: Jul 2015
Posts: 129
|
How comparison of objects is done in PHP5?
please give me answer of this quetion
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
10-01-2016, 01:37 PM | #2 |
Registered User
Join Date: Oct 2016
Posts: 1
|
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!
__________________
For programming tips and news, visit the To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
05-18-2017, 12:58 AM | #3 |
Registered User
Join Date: May 2017
Location: Viet Nam
Posts: 11
|
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 ‘===’.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How objects are stored in Java? | Shivangi Panwar | Java | 1 | 04-29-2016 09:24 PM |
Prodsea.com The best price comparison engine | SateeshReddy | Post your ad here | 1 | 03-11-2016 08:43 AM |
Please review price comparison website!! | marco98 | Review My Website | 0 | 11-09-2012 03:41 PM |
PHP Objects in Forms | ncjbhd | PHP / mySQL | 0 | 10-24-2011 12:33 AM |