{"action":"opened","issue":{"url":"https://api.github.com/repos/hhvm/hack-hhvm-docs/issues/534","labels_url":"https://api.github.com/repos/hhvm/hack-hhvm-docs/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/hhvm/hack-hhvm-docs/issues/534/comments","events_url":"https://api.github.com/repos/hhvm/hack-hhvm-docs/issues/534/events","html_url":"https://github.com/hhvm/hack-hhvm-docs/issues/534","id":67236861,"number":534,"title":"$stClassObject->{$var} notation in strict mode","user":{"login":"tchapi","id":1944007,"avatar_url":"https://avatars.githubusercontent.com/u/1944007?v=3","gravatar_id":"","url":"https://api.github.com/users/tchapi","html_url":"https://github.com/tchapi","followers_url":"https://api.github.com/users/tchapi/followers","following_url":"https://api.github.com/users/tchapi/following{/other_user}","gists_url":"https://api.github.com/users/tchapi/gists{/gist_id}","starred_url":"https://api.github.com/users/tchapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchapi/subscriptions","organizations_url":"https://api.github.com/users/tchapi/orgs","repos_url":"https://api.github.com/users/tchapi/repos","events_url":"https://api.github.com/users/tchapi/events{/privacy}","received_events_url":"https://api.github.com/users/tchapi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-08T22:47:44Z","updated_at":"2015-04-08T22:47:44Z","closed_at":null,"body":"Hi,\r\n\r\nI didn't find in the documentation why the `$stClassObject->{$var}` notation gives  an **Expected Expression** in strict mode (apart from the *Dynamic method call* problem); In the following example running on the 3.6.1 build, is there a reason why the type checker outputs such an error on the third try ? Is there any alternative to dynamically get the property of an object while still being in strict mode ?\r\n\r\n```hack\r\n<?hh // strict\r\nclass Stuff  {\r\n  public function test(): void {\r\n    $object = new stdClass();\r\n    $object->a = \"foobar\";\r\n    $a = 'a';\r\n    $object[$a]; // 1. This is not an object of type KeyedContainer, this is an object of type stdClass\r\n    $object->$a; // 2. Dynamic method call (Naming[2011])\r\n    $object->{$a}; // 3. Expected expression (Parsing[1002]) + Dynamic method call (Naming[2011])\r\n  }\r\n}\r\n```\r\n\r\nThanks a lot !\r\n-- c"}}