[PHP-DEV] Re: ++$i++ (was Re: [PHP-DEV] call_builtin_function_array() possible?) From: Andrei Zmievski (andrei <email protected>)
Date: 01/10/01

On Wed, 10 Jan 2001, Cynic wrote:
> I recently needed to process every other element of a
> numerically indexed array.
> for( $i = 0 ; $i < count( $a ) ; $x = $a[ ++$i++ ] )
> would have saved me one statement. I had to use
> for( $i = 0 ; $i < count( $a ) ; $x = $a[ $i++ ] , $i++ )
> I know, this is an 'issue' so tiny I can laugh at it, but
> anyway...

You know, this is not C, you are not going to save 0.2 microseconds of
execution time by writing obscure code like this. Even in C this is not
encouraged.

-Andrei

"The secret of flying is to throw yourself
at the ground, and miss." -- Douglas Adams

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>