I'm seeing some odd behavior with count( $arr, COUNT_RECURSIVE ) when used with SplFixedArray. Take this block of code, for instance...
$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 );
Result...
> 10
You would expect a result of 110. Is this normal behavior due to the fact that I'm nesting SplFixedArray objects?