hey, For many purpose we have to print the array or object while making a custom modules or debuging any old module, we have to print the array or object to see the values are fine or not, drupal provide a way to see those using watchdog, But how we print array or object in watchdog function, Answer is below.
watchdog("any_word_you_like", '<pre>' . print_r( $your_object_variable, true) . '</pre>');
Now, execute your function or page whenever you right it.
Then go to - https://yourdomian/admin/reports/dblog