Before we get into this, I've found the exact issue i'm dealing with, however the solution does not fix my issue.
Access a PHP-object with dollar-sign as node name
Here is the relevant PHP code.
$user = 'officialtiesto';
$artist_json = file_get_contents('https://gdata.youtube.com/feeds/api/users/' . $user . '?alt=json');
$artist_object = json_decode($artist_json, FALSE);
var_dump($artist_object->'yt$googlePlusUser');
I have also tried this:
var_dump($artist_object->{'yt$googlePlusUser'})
Both present me with the following error:
Parse error: syntax error, unexpected ''yt$googlePlusUser'' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Users\astark\Desktop\charts\youtube.php on line 22
I read somewhere that having an out of date version of PHP can cause issues similar to this so i've included a link to a JSBin (http://jsbin.com/yahevoyo) with the specs of the XAMPP setup i'm running. Pretty stumped here on this one and not sure if its just the late night getting to me, or a larger problem. Please advise.