re: What's the deal with downing PHP development? VIEW POST


Here are just a handful of reasons why PHP is generally regarded as a badly designed language:

Needless to say, PHP has its own advantages which makes it very easy to get a simple webpage up and running with little hassle - it mixes with HTML very well and its dynamic weak typing system doesn't "get in the way" unlike, say, Java (at least from the eyes of a total beginner). However, as one digs deeper into PHP, one will begin to find numerous inconsistencies in every aspect of the language - the inconsistent naming system of built-in PHP functions (e.g. the inverse function of htmlentities() is html_entity_decode()); the inconsistent naming conventions employed between different built-in PHP classes (e.g. classes related to reflection using camelCase for method names while those in the mysqli class using snake_case for method names) ... In simple use cases such as a personal webpage, such inconsistencies rarely cause an inconvenience but when you start building larger projects such as a corporate website, such inconsistencies start to become obvious which reduces the productivity of the programmer and makes unexpected bugs more likely (unless you already know PHP inside out).


So that being said. If you decide to open a business doing some type of software development. What is your choice?


Probably Python or C#. Depending on the type of software I intend to develop, C++ (or even C) is not out of the question either. Or I could just stick with JavaScript (it's got its own problems as well but at least has a wider range of applications than PHP) :p


What IDE are you using that doesn't autocomplete htm* ???

Similar problem exists when a library for one task was written by a camelcase fan and another by a snake case fan but I need to use both in 1 script.

But it's not a problem when the IDE can autocomplete.


Autocomplete may help you write code faster and reduce the burden of memorizing method names (for example) but it still doesn't change the fact that other developers will probably require slightly more effort reviewing/understanding your code just because there is a random mix of camelCase and snake_case.

The most likely person to review my php code is someone who also knows php.

And if I'm using a library whose author preferred camel case along with another library whose author preferred snake case, the problem still exists independent of PHP's inconsistencies.

Code of Conduct Report abuse