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.

Tags: , ,

1 Comment

Well thank goodness he fixed that.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment