You are viewing a single comment's thread from:

RE: PHP: Use associative arrays basically never

in #php5 years ago (edited)

This is rather older, but here's a post from Nikita Popov explaining the difference in storage in PHP 5.4: https://gist.github.com/nikic/5015323

The structs have changed dramatically in PHP 7, but the basic optimization he describes is still with us, and is the reason for these results.

Some more recent posts on the topic, too:

https://nikic.github.io/2011/12/12/How-big-are-PHP-arrays-really-Hint-BIG.html
https://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 62264.03
ETH 2431.11
USDT 1.00
SBD 2.50