Re: Re: 64bit and phpng, votes and plans
| From: | Nikita Popov | Date: | Tue, 20 May 2014 07:09:35 +0000 |
| Subject: | Re: Re: 64bit and phpng, votes and plans | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-74378@lists.php.net to get a copy of this message | ||
On Tue, May 20, 2014 at 4:54 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi Arvids,
>
> On Mon, May 19, 2014 at 8:59 PM, Arvids Godjuks <arvids.godjuks@gmail.com
> >wrote:
>
> > Yes, I
> > agree that an array of 2^64 bit elements probably will not be handled by
> > PHP anytime soon, but did you concider the fact that an array's key,
> > indexed by an ID column from the database, can easilly be bigger than 32
> > bit unsigned integer
> >
>
> Interesting point. I would not do this since I know the current limitation,
> but
> this is perfectly valid and practical usage.
>
> Regards,
>
You can already use a key larger than 32 bits to index an array. The
limitation only applies if you want to actually store more than 2^32 (or
2^31 depending on the exact implementation) elements. That's the beauty of
a hashtable: The allowed key domain is totally independent of the hashtable
size ;)
Nikita