| ▲ | hparadiz 21 hours ago | |
It's a performance optimization in this case. '1' is a string and you can hash it like all the other strings with PHP's fork of djbx33a or you can immediately store it at memory index 1. PHP tends to have a lot of old code using numeric strings so the performance benefit of not hashing all of those is obvious. | ||
| ▲ | wesammikhail 19 hours ago | parent [-] | |
I never dug into it but I suspected memory optimization to be the reason. Thanks for confirming. | ||