Here’s part of a var_dump of a response to a request. We’ll call it $response:
object(NeverBounce\Object\VerificationObject)#4 (1) {
["response":protected]=>
array(9) {
["status"]=>
string(7) "success"
["result"]=>
string(7) "invalid"
...
I know how to access the array values of $response and assign them to variables using:
$var1 = response->[status];
$var2 = response->[result];
Except for one little problem... The :protected appended to response.
How do I refer to status and result when assigning them to $var1 and $var2? The syntax above doesn’t work because of the protected state of the array. I did read in the manual and other posts about protected, private, public but being new at this, it made little sense.
Perhaps I am fantasizing but it seems there must be a simple way to do this.
Please advise. All help and comments appreciated.