<p>I ran into this bug where an element of an array, if its index is the string "0", is inaccessible. </p>

<p>It's not a bug with unserialize, either, as this occurred in my code without invoking it.</p>

<pre><code>$arr = unserialize('a:1:{s:1:"0";i:5;}');
var_dump($arr["0"]); //should be 5, but is NULL
var_dump($arr[0]);   //maybe this would work?  no. NULL
</code></pre>

<p>Am I doing something wrong here?  How do I access this element of the array?</p>

Actually, the code in your question yields
```
```
int(5)
```
```