5 ms·
The real reason why no one should use PHP
- dkhenry 14y agoThere is no documentation about the internals of PHP. You are left groping through others source code to do anything useful. For comparison here is Pythons documentation http://docs.python.org/c-api/index.html http://docs.python.org/c-api/index.html
- SkippyZA 14y agoThe lack of internal documentation may turn away a small bunch of people, but definitely not a reason to discredit the language.
- dkhenry 14y agoThis has less to do with the language and more to do with the ecosystem. If you ever get to a point where you need to extend the language your out of luck with PHP. Sure for most PHP users who cares they are just using it as a glorified CGI interface ,but if your building a product off it think twice you will reach a point where you will either have to rewrite everything or wade through the undocumented internals of PHP.
- btown 14y agoOr, you know, rewrite the entire engine so it compiles into native C code or something. The fact that Facebook found that task preferable to hacking on the undocumented internals for performance says just as much.
- Produce 14y agoIf it's such a big deal to you, why don't you contribute some documentation?
- debacle 14y agoThe guys who write the PHP interpreter are egotistical, not very good at C, and make poor decisions. And it's a very good reason not to use PHP - the best reason. The poor implementation of namespaces, anonymous functions, and the issues with the OO implementation of PHP core classes (like SoapClient) leaves much to be desired.
- risratorn 14y agoIt's getting really sad to see people come up with really anything to bash on PHP. Can't we just build the most fantastic tools and apps with whatever we want instead of giving off at the tools we use to create them? I've been using php for almost 10 years and I didn't even know the C-api isn't documented on php.net. But what do I care? It's like saying you won't drive your car to work because there are no usage instructions of the carburator in your car manual. Seriously ... WTF? Let it go.
- RollAHardSix 14y agoThat is a great analogy. Hope you don't mind if I steal it? I've noticed this on HN, too many people are bleeding-edge, cutting-edge and seem to forget that best tools for the job are what's in your toolbox. You might not carry around a power miter but you will probably have a small hand-saw. PHP is a lot of things, but it's also taught at the local community college, and it's quick to pick-up even without collegiate education. That vastly widens my possible talent pool, my rapid development process, or training of my employees.
- risratorn 14y agoThanks, depends on what you want to use it for ... if it's to bash on php no ... else feel free to "re-use" it ... stealing gets you in jail :p
- pan69 14y agoAnd yet still, it's powering half the Internet...
- oinksoft 14y agoThis isn't a reason at all ... if I'm trying to sell web software as a product and not as a service, there's a very good chance I'm going to write it in PHP, and neither myself nor my customers will care that PHP internals lack documentation.
- vampirechicken 14y agoPHP stole my sister's bike.