You are viewing a single comment's thread from:

RE: PHP: Use associative arrays basically never

in #php8 years ago

Nice benchmark !

And what about extending Serializable on the named class to still store it as an associative array ?

Is it the best win-win combo ? Of course we need to ask if defining serialization for simple data struct is relevant 😊.

Sort:  

My guess is it would be slower because it has to call serialize/deserialize in user-space for each class. It might end up being smaller but the performance cost is likely not worth it. That said, I haven't tried.

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.101
BTC 65404.80
ETH 1879.47
USDT 1.00
SBD 0.39