Monday, January 27, 2014

PHP Function Naming

Rasmus Lerdorf (via Hacker News):

htmlspecialchars was a very early function. Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths names were picked specifically to make them fit into a specific length bucket.

1 Comment RSS · Twitter


Well thank goodness he fixed that.

Leave a Comment