Re: [PHP-DEV] Question about hashtables implementation

2012-09-02 Thread Sherif Ramadan
On Sun, Sep 2, 2012 at 5:27 PM, Adam Richardson wrote: > On Sun, Sep 2, 2012 at 4:41 PM, Sherif Ramadan > wrote: >> >> You're right. I don't know what I was thinking when I said linked list. :) > > No problem :) > > You might want to post a quick correction to the thread, as everything > else yo

Re: [PHP-DEV] Question about hashtables implementation

2012-09-02 Thread Sherif Ramadan
> > OK, thanks for the information. It explains why I didn't find anything in > the HashTable structure (unlike iterator pointer or the next free key). > Yes, because the hashtable is an ordered map. The only way to logically prepend to it is to rework the whole thing. That's generally how you pre

Re: [PHP-DEV] Question about hashtables implementation

2012-09-02 Thread Amaury Bouchard
2012/9/2 Sherif Ramadan > To clarify, this particular functionality you're using as an example > "array_unshift" really isn't specific to the internal implementation > of hashtables in PHP. That is to say that this side-effect you're > describing is specific to that function and not necessarily >

Re: [PHP-DEV] Question about hashtables implementation

2012-09-02 Thread Sherif Ramadan
> Hi all, > > I have a question about the internal implementation of PHP's hashtables. I > did some researches, but I didn't find the answer. > > Here is an example of what I would like to understand. > Start by creating an array: > $a = array(); > > Fill it, using implicit and explicit keys: > $