Re: ++$i++ (was Re: [PHP-DEV] call_builtin_function_array() possible?)

From: Date: Wed, 10 Jan 2001 14:11:10 +0000
Subject: Re: ++$i++ (was Re: [PHP-DEV] call_builtin_function_array() possible?)
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-43691@lists.php.net to get a copy of this message
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

« previous php.dev (#43691) next »