title: What does PHP operator ->{...} mean?
body: <p>I recently saw this line in a PHP piece of code:</p>
  
  <pre><code>$dbObject = json_decode($jsonString);
  $dbObject-&gt;{'mysql-5.4'}[0]-&gt;credentials
  </code></pre>
  
  <p>What does this mean? In the <a href="http://php.net/manual/en/language.types.array.php" rel="nofollow noreferrer">PHP docs</a> we can read, that </p>
  
  <blockquote>
    <p>Both square brackets and curly braces can be used interchangeably for accessing array elements (e.g. $array[42] and $array{42} will both do the same thing in the example above). </p>
  </blockquote>
  
  <p>But how can the Object $dbObject be defined to allow <code>-&gt;{...}[...]</code>access? Is this code kind of unsafe? Which PHP version does allow this?</p>
  
  <p>Did I miss anything in the PHP docs? </p>