First, there is no yt$googlePlusUser
, it's yt$googlePlusUserId
.
Then you've missed one level. Instead of
$artist_object->{'yt$googlePlusUserId'}
use
$artist_object->entry->{'yt$googlePlusUserId'}
And finally, as a bonus, to get the ID:
$artist_object->entry->{'yt$googlePlusUserId'}->{'$t'}
Alternatively as it's written in the answer to the question you referred to you could convert the JSON object to an array using $artist = json_decode($artist_json, true)
and access the property as $artist['entry']['yt$googlePlusUserId']['$t]
.
Update:
Regarding PHP version, etc. you seem to have 5.4.19 installed, I've tested the above on 5.4.0 and it works.