Ford, Mike wrote:
> On 06 November 2007 12:57, Christoph Boget wrote:
>
>> Consider the following test code:
>
> [...snip...]
>
>> Running that I found that
>>
>> if( isset( $myArray[$key] ))
>>
>> is faster than
>>
>> if( array key exists( $key, $myArray ))
>>
>> is faster than
>>
>> if( $myAr
On 06 November 2007 12:57, Christoph Boget wrote:
> Consider the following test code:
[...snip...]
> Running that I found that
>
> if( isset( $myArray[$key] ))
>
> is faster than
>
> if( array key exists( $key, $myArray ))
>
> is faster than
>
> if( $myArray[$key] )
>
> To be honest, I wa
Consider the following test code:
';
$startTime = microtime( TRUE );
$foundCount = 0;
for( $i = 0; $i <= 1; $i++ )
{
$date = microtime( TRUE );
$key = rand( $date, $date * rand( 1, 5000 ));
if( array key exists( $key, $myArray ))
{
$foundCount++;
}
}
$e
3 matches
Mail list logo