Re: [PHP-DEV] Inserting string keys in arrays at any position

2017-11-08 Thread Thomas Hruska
On 11/3/2017 7:46 AM, Bishop Bettini wrote: On Fri, Nov 3, 2017 at 9:51 AM, Thomas Hruska wrote: http://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html Ah. Very clever and cool. That memory layout does indeed pose a problem with random order insertions of string keys. De

Re: [PHP-DEV] Inserting string keys in arrays at any position

2017-11-03 Thread Bishop Bettini
On Fri, Nov 3, 2017 at 9:51 AM, Thomas Hruska wrote: > I've been wondering for some time why PHP does not have the ability to > efficiently insert string keys before/after an existing string key. > > Let's say I have an array of 10,000 string key/value pairs and I want to > insert five new string

[PHP-DEV] Inserting string keys in arrays at any position

2017-11-03 Thread Thomas Hruska
I've been wondering for some time why PHP does not have the ability to efficiently insert string keys before/after an existing string key. Let's say I have an array of 10,000 string key/value pairs and I want to insert five new string key/value pairs at specific positions in the existing array