I'm trying to compare two objects like this:
if($obj1==$obj2){
...
But my comparison always return false!
$obj1 is a param of my function (called through a Webservice) of type "MySoapObject".
$obj2 is an object of type "MySoapObject" loaded from my database.
In my test print_r of my both objects give me this:
stdClass Object
(
[establishment] => stdClass Object
(
[f_establishment_id] => 4
[f_name] => MyEstablishment
[f_display_name] => v
[f_main_web_link] =>
[f_contact] =>
[f_country_code] =>
[f_city] =>
[f_zip_code] =>
[f_postal_address] =>
[f_default_language] =>
[f_timezone] =>
[f_cloud_synchronisation_action] => TO_SYNC
)
[site_list] => Array
(
[0] => stdClass Object
(
[f_site_id] => Site1
[f_status] => TO_DISABLE
[f_name] => Site1
)
)
)
By the way, if I try this:
if(print_r($obj1)==print_r($obj2)){
...
The result is true!
Have you an idea of where could be the problem? How to solve it? Thanks for your help.