krakjoe / apcu

APCu - APC User Cache
Other
964 stars 196 forks source link

Unnecessary casts to double for nhits, num_misses, mem_size, seg_size, avail_mem in helper methods #473

Open TysonAndre opened 1 year ago

TysonAndre commented 1 year ago

(For apcu_sma_info and apc_cache_info)

This doesn't really affect me, it's just surprising

See https://github.com/krakjoe/apcu/blob/master/tests/apcu_sma_info.phpt#L20

Those are internally represented as a zend_long for many of these, making the cast unnecessary, and the majority of installations would be 64-bit anyway. I'm not sure if this is a holdover to let it work for 32-bit builds (x32) on 64-bit oses