How do I access the value of stdClass with colon \":protected\"?
For example, I had this $obj with these result :
object(Google_Service_Plus_PeopleFeed)
It's not a stdClass
object, it's an object of the class Google_Service_Plus_PeopleFeed
. You cannot access protected properties of a class [easily]. If the class doesn't want you to access the data, then you shouldn't. But typically the class offers some method you can call to get the data, like $obj->getData()
or some such. Look at the class definition or its documentation to see how you're supposed to use the class.