Commit

554e73f

TIL why PHP function names are so inconsistent (strlen vs str_replace). In 1994, Rasmus Lerdorf used strlen() as his actual hash function. He added or removed underscores just to balance the hash buckets by character count.
Do I get it correctly, the function names were chosen to keep unique length?
txt
5  nl2br
6  strlen
8  strptime
16 htmlspecialchars

commit 554e73f

As I understand it, they weren't completely unique, just evenly distributed. With hundreds of functions, unique lengths wouldn't have worked anyway. From what I read, the goal was just to balance the hash buckets so none of them got overloaded, keeping lookups fast. So if a…