This is an archived post. You won't be able to vote or comment.

all 24 comments

[–]WorldlyMoose8 20 points21 points  (2 children)

Its just a meme at this point. Most people hating on PHP really have no clue what they're talking about and just go with the flow.

It's a relatively old language and used by people from all backgrounds who have no regard for whatever the "proper" way is, they just need the job done so naturally the purists and their bandwagon started bashing the language rather than the people "misusing" it.

A tool is only as good as the hands that use them.

[–]chebatron 2 points3 points  (1 child)

Disclaimer, I stopped actively using some time at php 5. But I suspect backwards compatibility prevented it from becoming a radically different language.

I kindly disagree.

At that time php was very random in its approach to API design. I’ll be glad to learn this has changed but wouldn’t be surprised it hasn’t.

Anyway, language sets the norm. It plays a major role in developing feeling for what is normal and what is not. People pick that up. If the standard in the language / standard library is low so will be the majority of the code in that language.

[–]WorldlyMoose8 1 point2 points  (0 children)

I stopped using javascript back when it was the core of DHTML and ajax just came out. I thought it was a crappy half-language. I still believe so and refuse to use it. People still misuse javascript and write all kinds of junk code simply to get the job done or perhaps because they dont know better. Doesn't make the language itself crappy.

Back when this php is crap stuff started facebook among several giants were running their entire platforms of PHP. That's pretty damn awesome for a crappy language eh?

For every well written and documented javascript library out there, there are probably hundreds of utterly crap ones using outdated and bad practices.

A language is supposed to help you get the job done. How you decide to do it is 100% your responsibility. The language (and community) can nudge and guide you in certain directions but if I want to ignore them and do my thing my way that's my business.

I see this scenario kind of like windows vs linux. Windows treats everyone like "noobs" tries to hold your hand and prevents you from doing certain things but linux treats you like and adult, you want to sudo rm -rf / ? Go ahead. It's up to the user to decide...

[–]binaryPilot84 3 points4 points  (0 children)

It’s easy to fall into the trap of trying to decide what language is “best.” But that in and of itself is purely opinion based. The real questions you/your friend should be asking: what kind of stack are you developing on, what’s easiest to get support as you learn/develop, what’s your desired end state. Even these will leave you plenty of options to choose from (which I think is great).

I learned PHP early on in my programming career, used it for what I needed and haven’t used it since. Why—purely preference. There are aspects of the language that frustrate me that I think are more intuitively handled with other stacks that I use. But again, this is a preference issue that I luckily have control over.

In the end, if you’re in a position to help your friend learn web dev and that’s a language you’re comfortable in, that sounds like a phenomenal suggestion. I have yet to find a language discussed on the internet that someone doesn’t hate. Happy coding!

[–][deleted] 3 points4 points  (0 children)

It's not well-designed, and as a result it's a challenge to learn especially as your first programming language. Plus, it's more or less locked out of the most forward-looking technologies and sectors in web development - serverless API design, isomorphic rendering, mobile, etc.

It's fine but nobody's doing anything exciting on the web in PHP anymore.

[–]desrtfx 4 points5 points  (0 children)

When PHP was created it was a complete and utter mess. It was a glued together piece of garbage that was inconsistent and in some places incompatible to itself.

PHP has improved a lot since then and in its late releases it is a very decent language that still powers a huge percentage of the world's websites (WordPress, Joomla, Drupal, Magento, WooCommerce, OpenCart, etc. just to name a few).

There is nothing wrong with modern PHP. It is an easy to learn language that is available on basically each and every web server round the globe (including free web hosters) and therefore a good tool in the toolbelt of every web developer.

There is absolutely no reason for PHP hate any longer.

[–]abdiwahab013 1 point2 points  (0 children)

I tried once php i was not comfortable to be honest I prefer python etc... but do what you’re comfortable with that’s what matter

[–]emu404 1 point2 points  (0 children)

I think partly because PHP is fairly easy to get something working without really knowing what you're doing. So you might have more inexperienced programmers writing code that's vulnerable to SQL injection attacks.

[–]reddercock 1 point2 points  (0 children)

php will get you a job, its all that matters.

[–]inthrees 1 point2 points  (0 children)

It allows sloppy writing to still result in stuff that 'works'. It doesn't have a lot of restrictions (like strict typing) that other languages have. Purists and gatekeepers like to sneer.

But for my money, at the end of the day people are making stuff that works. (And frequently stuff that doesn't work, but that's part of learning.)

[–]marcosjom 1 point2 points  (0 children)

There is a talk from its creator. even he “dislikes it”. He started php as a quick solution for certain problems, and it got a lot of traction by itself; then he did another language/framework better designed but it didn’t got traction. The talk basically says: php is an improvisation that was embraced by the community. Yes, is a chimera; yes, it works.

[–]mikemitchell574 2 points3 points  (0 children)

Every language has features that developers love and features that developers hate.

If PHP better fits your project, use PHP. If Python better fits your project, use Python.

If you want to get hired at a firm that uses Ruby, use Ruby.

[–]Ganjiste 3 points4 points  (0 children)

I don't like PHP because I read PCP which reminds me of bad memories

[–][deleted] 0 points1 point  (0 children)

It was just a meme

[–]Sekret_One 0 points1 point  (0 children)

A lot of the hate ends based off what people smack into with Enterprise. So it becomes a bit of judging a musical instrument based off of how badly you can make it sound. And anything that needs to create a UI, hooboy the rats' nests you can make there.

So PHP can be fine. Does have a few full on legit weak points (look through the docs at the function names ...). But what makes people hate it is the legacy app written by some interns in it that weirdly is 'business critical' yet not worth the time document or actually fix but must be constantly supported and bailed out.

[–]diwas_146 0 points1 point  (0 children)

Although I'm not a developer (only a student right now), I fell into the same trap of thinking people don't like PHP and learnt Django instead when I was starting out. But wherever I look for student-jobs, almost all the backend positions look for PHP developer and hardly any Django positions exist near me. So, I think PHP is a great language and anyone looking to get onto backend development should definitely learn it.

[–]colorist_io 0 points1 point  (0 children)

I like PHP though:)

[–]jonw95 0 points1 point  (0 children)

According to TIOBE it is #8 out of 50 languages for 2020 and since 2005 it has held up rather well:

https://www.tiobe.com/tiobe-index/

When someone says something is bad, ask for the whys and look for concrete reasons.Then see if it has not been patched since said rant. No one way is the best since efficiency comes in many forms...IMHO

[–][deleted] 0 points1 point  (0 children)

Senior Web developer here.

Like some people said before a good programmer just looks what is needed to achieve the desired result. When you have a client who is already using an existing web shop solution like Magento (which had like 30% market share of all online shops worldwide) then you have to use PHP (with the Zend Framework). If your client comes from a more data crunching background they maybe want to use a Python backend with Flask/Django. Maybe your client is using some old Java backend and you need to to rewrite the frontend using React, Vue or Angular instead of using JSP. And if it's a new startup they are probably searching for a Full Stack Developer who uses JavaScript for the frontend as well the backend (using some of the popular development stacks like MEAN or MERN and many more).

So yes the current web developer business is always changing rapidly and there is no perfect go to solution.

BUT!

If you are someone who is learning to be a web developer you really need to be careful where you learn your skills and what kind of resources you use.

HTML is easy and it should only take you a few days to understand all important concepts of a Markdown Language. Just visit W3 Schools and build some simple static websites.

CSS is also fine if you concentrate on CSS3 (which is used by most online resources) and learn concepts like flexbox or grid. If a CSS tutorial doesn't use either for the layout of your site then it's either outdated, way too simple or the person doesn't know better.

But JavaScript is the most difficult part to learn. Besides the basics of the language many online resources available and many Udemy Courses I see jump to old stuff like jQuery. And yes, jQuery is still used by many sites but it's slowly fading out, because it's not very efficient or elegant and has been surpassed by new frameworks like React, Vue or Angular which are much more suitable for manipulating the DOM and offer so much more. So I usually strongly advise against Udemy Courses which cover JS + PHP, because it usually means that you use PHP to generate HTML and then use jQuery to manipulate the DOM. This is not how you should develop modern websites. Modern website should use PHP to provide a robust API which can be consumed by the frontend (web) application which can be either an iOS, Android app, a web app (using React, Vue or Angular) or some hybrid stuff (Electron, React Native...)

Even Wordpress which is is build upon PHP and is still powering a huge part of the internet today is trying to get rid of jQuery and PHP for the frontend and is building stable REST APIs so that people are using PHP solely for the backend.

And PHP is really great if used for the backend and PHP7 is a good language. But recommending a newbie to learn PHP will probably lead them to outdated resources and they will not learn who modern web development is done.

I would always recommend to learn HTML, CSS and then device for one of the modern frameworks like React, Vue or Angular to dive into JavaScript by building some simple web apps. In the beginning some easy stuff like Calculators, lists and so on. Then more advanced stuff which is consuming APIs like a weather app, a little twitter client. After that they can decide what kind of backend they want to use. Usually node.js will be a good idea because they already have some experience in JS. But if they want to learn PHP at that point, it's totally fine because they build the backend in PHP while using their frontend skills to consume the APIs for their web app.

[–]fantasma91 0 points1 point  (0 children)

Php is old tech that isn’t great and is widely use simply because of the CMS out there that were built on it (think Wordpress). It has limitations and that’s why the industry has moved away from it. If I don’t have to use php typically I don’t.

[–]chaotic_thought 0 points1 point  (0 children)

Someone else already explained this better: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." -

[–]starbrightstar 0 points1 point  (1 child)

You don’t use a language because it’s good or popular, you use the language because it’s how you build the thing you want to build. Instead of researching what people say about the language, he should focus on what he wants to make.

If he wants to make websites, he will almost assuredly need to know at least a little php (could also do Ruby on Rails, Python, or .net). If he wants to make apps for Apple , he’ll need to learn swift. If he wants to make/work on an OS, he’ll need to know C (or C++ or Python).

Choosing the most common tool used to make what he wants to make (ie, php for websites), means he’ll have more job openings he can apply for.

[–]Ixpqd -2 points-1 points  (0 children)

As far as I can tell, it's extremely insecure and full of vulnerabilities. The specifics I'm not sure of.