I’m trying to make use of the arguments used in the default Kirby hooks. e.g:
'user.update:after' => function ($newUser, $oldUser) {
// echo $newUser 
// echo $newUser->toString(); 
// var_dump($newUser) 
// echo json_encode($newUser) 
}
I wanted to take a look at the structure of $newUser and $oldUser so I can write a function to compare them, but any kind of attempt to display gives:
Exception: undefined
The JSON response from the API could not be parsed. Please check your API connection.
How can I take a look at the structure of $newUser, $oldUser (and other similar objects from hook arguments) when I update the page so I can then design my methods around them?
Many thanks.