array_shift not removing the first element of the array
<p>I have the following code</p>

<pre><code>    echo '&lt;pre&gt;';
    print_r($this-&gt;region_id);
    echo '&lt;/pre&gt;';


    if(end($this-&gt;region_id) != 0){
        if($this-&gt;region_id[0] == 0){
            array_shift($this-&gt;region_id);  
        }
    }

    echo '&lt;pre&gt;';
    print_r($this-&gt;region_id);
    echo '&lt;/pre&gt;';
</code></pre>

<p>Somehow it's not removing the first element of the array, since my results look exactly the same after the code runs with the print_r</p>

<pre><code>Array
(
    [0] =&gt; 0
    [1] =&gt; 30
    [2] =&gt; 14
)

Array
(
    [0] =&gt; 0
    [1] =&gt; 30
    [2] =&gt; 14
)
</code></pre>

<p>The code does reach the array shift.</p>
