PHP: What is the complexity [i.e O(1),O(n)] of the function 'count'?
<p>What is the Big-O time complexity of the <a href="http://php.net/manual/en/function.count.php" rel="nofollow"><code>count()</code></a> function for arrays?</p>

<p>Example</p>

<pre><code>$x = array(1,2,3);
echo count($x); // how many operation does it takes to count the elements 
                // of the array? is it 3, or is it 1
</code></pre>
