Working on it right now, in fact..

On Fri, 16 Mar 2001, [EMAIL PROTECTED] wrote:
> ID: 9794
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Assigned
> Bug Type: Scripting Engine problem
> Assigned To: andrei
> Comments:
> 
> I'll fix this problem soon. It's even in the TODO.
> 
> (on behalf of Andrei..so that he doesn't forget this.. :)
> 
> --Jani
> 
> 
> Previous Comments:
> ---------------------------------------------------------------------------
> 
> [2001-03-16 12:13:24] [EMAIL PROTECTED]
> The following code is broken:
> 
> $arr = array("a", "b", "c");
> foreach ($arr as $a) {
>   echo "$a<BR>n";
>   echo max(array_keys($arr));
> }
> 
> It stops after the first array element because array_keys resets the array pointer. 
>(Or at least it's moved to the end...)
> 
> This is sort of a (repectful) complaint that I have about PHP and they way it's been 
>written.  Arrays are systematically prostituted by the array functions because each 
>one of them sees fit to reset the array pointer instead of just working off of a 
>copy, or at the very least, returning the array pointer to it's previous state.
> 
> Is there some reason that the array pointer can't be returned to it's previous state 
>after the array functions are finished with it?
> 
> 
> ---------------------------------------------------------------------------
> 
> 
> 
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at http://bugs.php.net/?id=9794&edit=2
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



-Andrei
* Ethernet n.: something used to catch the etherbunny. *

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to