6 ms·
I said that there is great PHP code, I've run into many projects in PHP that are extremely well written. However, I run into more PHP projects that are not. PH
by overshard 12y ago
I said that there is great PHP code, I've run into many projects in PHP that are extremely well written. However, I run into more PHP projects that are not.
PHP is fantastically easy to get started using, it's probably the simplest way to start doing website development, and Wordpress runs many of the small websites we see today. I recommend it to anyone getting started in web development. But what this leads to in website development is me running into more code in PHP that is bad than good.
You are correct in saying that there's horrible $YOUR_FAVORITE_LANGUAGE code, I do run into it all the time, but I just tend to run into this problem more with PHP due to how amazingly low the barrier to entry is.
Since you brought up my favorite language, Python, I will go to say that at least Python forces people who write it to use sensible whitespace more or less. I can read most Python projects, even if they are really bad. In PHP I've seen whitespace and lines that stretch over 500 characters and combinations of tabs and spaces that make my brain hurt. This goes for any language that doesn't have strict whitespace rules but specifically PHP and even JavaScript, with their ability to inline code in HTML, have lead to some nightmare codebases that I've had to work on. That is not to say that Python doesn't have some silly long lines with people who try to get too creative with lambda functions but that's a rare occurrence. Also the fact that you cannot inline Python (without some silly libraries that do exist) you do get at least some separation of templates and model/views. This goes for Java and C# and whatever other web dev language you want to put in. PHP's ability to inline code is both incredible for new coders and a nightmare for readability if not done properly.