title: PHP inconsistency with unpack
body: <p>For the last few days I have been working on a lot of socket-related tasks and had to make use of the <code>pack()</code> and <code>unpack()</code> functions.</p>
  
  <p>For those of you, who have never used these functions: the pack function packs a number of variables into a binary string. For example you could store 8 boolean variables on just one byte this way.</p>
  
  <p>Now, while unpacking my data I noticed a rather peculiar behavior. Let’s see:</p>
  
  <pre><code>php &gt; var_dump(unpack('n2', pack('n2', 1234, 1234)));
  array(2) {
    [1]=&gt;
    int(1234)
    [2]=&gt;
    int(1234)
  }
  </code></pre>
  
  <p>As you can see, the result array of unpack is <strong>indexed from 1</strong> instead of the usual 0. (Most PHP functions return arrays indexed from 0.) </p>
  
  <p>My question is, is there a specific reason PHP does this, or is it a bug?</p>