Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > PHP / mySQL


Thread Tools Rate Thread Display Modes
Old 09-29-2016, 04:24 AM   #1
Registered User
Join Date: Jul 2015
Posts: 150
How comparison of objects is done in PHP5?

please give me answer of this quetion
Aman897 is offline   Reply With Quote

Old 10-01-2016, 01:37 PM   #2
Registered User
Join Date: Oct 2016
Posts: 2
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 Northgate Digital Build Script
sjaslow is offline   Reply With Quote
Old 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 ‘===’.
btsoft is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What are objects, anyway? chinmay.sahoo PHP / mySQL 0 07-20-2016 04:51 AM
How objects are stored in Java? Shivangi Panwar Java 1 04-29-2016 09:24 PM The best price comparison engine SateeshReddy Post your ad here 1 03-11-2016 07:43 AM
Please review price comparison website!! marco98 Review My Website 1 01-16-2014 11:16 PM
PHP Objects in Forms ncjbhd PHP / mySQL 0 10-24-2011 12:33 AM

All times are GMT -7. The time now is 02:14 PM.

Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.