Q:

access php objects with properties

Google auth services return a php object (Lets call it $Ticket).  It's value is this
Google_LoginTicket Object ( [envelope:Google_LoginTicket:private] => Array ( [alg] => RS256 [kid] => 057d4167ee9b75e7b3a3fcc9c1ca17a14dab5044 ) )

Now i want to access the value of alg, that is "RS256".  
print_r ($Ticket->{'envelope:Google_LoginTicket:private'});

print_r doesn't give anything. 

A:

Google_LoginTicket have getAttributes() function, which return array of attributes, you can check this, in source code
https://github.com/sylvainw/GPlusGlobe/blob/master/src/auth/Google_LoginTicket.php
$attrs = $Ticket->getAttributes();
print_r($attrs["envelope"]);

