How is the comparison of objects done in php?



How is the comparison of objects done in php?..

Answer / Hidayat Husain Naqvi

In PHP, for comparing objects, you can use the comparison operators (== and ===). However, please note that these will compare object references, not their values. For comparing values of objects, you should use the is_object() function, get_class(), and the is_a() function.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is meant by pdo in php?

1 Answers  


What is difference between variable declaration and variable definition?

1 Answers  


What is api laravel?

1 Answers  


Explain how to execute a php script using command line.

1 Answers  


Which PHP function would you use to send an email?

1 Answers  


if i give Limit for mysql query through php command line script like this for ex. $limit=500; $total_items = 1500; for($start=0;$start<$total_items;){ $command = "/usr/bin/php -q /home/sitename/public_html/admin/feedmanager/test.php feedid ".$_GET['feedid']." start ".$start." end ".$limit ; $start = $start+$limit; $command_result = system($command); } so it's execute command for 3 times so it give limit to sql query but if i have 27000 data so it takes long time? so my question is that is that any way from php command line script that i can use for collect all the data at once?

0 Answers  


how to upload more than 50 mb? i tried but session was expired....certain time .....i was set session duration three days .... how to rectified? if any one know that post ur answer as soon as possible?already i was increase php.ini but not working......

2 Answers  


What is the difference between static and dynamic websites?

1 Answers  


Tell me how to find the length of a string?

1 Answers  


Are objects passed by value or by reference?

1 Answers  


What is the use of "ksort" in php?

1 Answers  


How to call javascript function in php on button click?

1 Answers  


Categories