SplFixedArrayで使用すると、 count( $arr, COUNT_RECURSIVE ) で奇妙な動作が見られます。たとえば、このコードブロックを見てください...
$structure = new SplFixedArray( 10 );
for( $r = 0; $r < 10; $r++ )
{
$structure[ $r ] = new SplFixedArray( 10 );
for( $c = 0; $c < 10; $c++ )
{
$structure[ $r ][ $c ] = true;
}
}
echo count( $structure, COUNT_RECURSIVE );
結果...
> 10
110 という結果が予想されます。SplFixedArray オブジェクトをネストしているため、これは正常な動作ですか?