<story><title>PHP functions originally bucketed by strlen, were renamed to balance length</title><url>http://news.php.net/php.internals/70691</url></story><parent_chain><item><author>mikeash</author><text>The site is extremely slow at the moment. In case anyone has trouble accessing it, I managed to load it, and here&amp;#x27;s the relevant bit:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    Well, there were other factors in play there. 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. This was circa late 1994 when PHP was a tool just for my own
    personal use and I wasn&amp;#x27;t too worried about not being able to remember
    the few function names.&lt;/code&gt;&lt;/pre&gt;</text></item></parent_chain><comment><author>TOGoS</author><text>That he futzed around with function name lengths instead of just fixing the hash function is a pretty good analogy for both  the design of the language as a whole and to much of the code that&amp;#x27;s written in it.&lt;p&gt;Queue &amp;quot;it&amp;#x27;s popular and therefore must be good&amp;quot; trolls.</text></comment>
<story><title>PHP functions originally bucketed by strlen, were renamed to balance length</title><url>http://news.php.net/php.internals/70691</url></story><parent_chain><item><author>mikeash</author><text>The site is extremely slow at the moment. In case anyone has trouble accessing it, I managed to load it, and here&amp;#x27;s the relevant bit:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    Well, there were other factors in play there. 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. This was circa late 1994 when PHP was a tool just for my own
    personal use and I wasn&amp;#x27;t too worried about not being able to remember
    the few function names.&lt;/code&gt;&lt;/pre&gt;</text></item></parent_chain><comment><author>tptacek</author><text>That can&amp;#x27;t possibly be true. I refuse to believe it.</text></comment>