A Google APIs encoded in JSON returned an object such as this
[updated] => stdClass Object ( [$t] => 2010-08-18T19:17:42.026Z )
Anyone
I'm using php7 and the following works fine for me:
class User { public $name = 'john'; } $u = new User(); $attr = 'name'; print $u->$attr;