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.
Commit
c21203a
Do I get it correctly, the function names were chosen to keep unique length?
txt
5 nl2br 6 strlen 8 strptime 16 htmlspecialchars
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 specific length was getting too crowded, he'd tweak the name to shift it into a less populated bucket.
commit c21203a