Mostly because the legacy of PHP as a toy project carried forward forever. Here's a great tidbit about why all the original functions have ridiculous, inconsistent naming schemes:
> "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't too worried about not being able to remember the few function names."
That's right: Every one of the original function names has a different character length because length was used as a lookup. There are a lot of clowny things like this that have never been stamped out of the language.
Add to that its history of being a beginner language that most of its early adopters sprinkled into HTML and where many people who mayyybe have no business being professional programmers started making a career out of it. This severely undermined PHP's credibility as a language for professionals even though good software can be created in PHP in the right hands.
That all said, I spent about year coding in Hack, and while the parts that still feel like PHP are annoying, it is awesome in so many other ways. Hopefully it either starts to unseat PHP or PHP turns into Hack at some point.
The "Personal Homepage Program" certainly grew organically. Many experienced developers prefer a much more structured approach to defining a language and environment, one with more consistent naming schemes. PHP cannot escape its roots -- it was doomed from the start in this regard.
> "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't too worried about not being able to remember the few function names."
That's right: Every one of the original function names has a different character length because length was used as a lookup. There are a lot of clowny things like this that have never been stamped out of the language.
Add to that its history of being a beginner language that most of its early adopters sprinkled into HTML and where many people who mayyybe have no business being professional programmers started making a career out of it. This severely undermined PHP's credibility as a language for professionals even though good software can be created in PHP in the right hands.
That all said, I spent about year coding in Hack, and while the parts that still feel like PHP are annoying, it is awesome in so many other ways. Hopefully it either starts to unseat PHP or PHP turns into Hack at some point.