title: Using `/` as an array index in PHP, then casting to object
body: <p>I have an array that is defined as such:</p>
  
  <pre><code>$bar = array(
     '/' =&gt; 'foo'
  );
  </code></pre>
  
  <p>I can convert it to a class (using <code>$baz = (object) $bar</code>), and I don't get any errors. <code>$baz</code> contains the following: (via <code>var_dump</code>)</p>
  
  <pre><code>object(stdClass)#1 (1) {
    ["/"]=&gt;
    string(3) "foo"
  }
  </code></pre>
  
  <p>However, I can't seem to find a way to access the <code>/</code> property of <code>$baz</code>. I thought I could use <code>$baz -&gt; /;</code>, but obviously there are syntax issues with that statement.</p>
  
  <p>Thanks for the help!</p>