Have you seen this cartoon before? The Lisp panel is especially ((((((hilarious)))))). It is fun to mock each eccentricity of a programming language. Unless you are a PHP developer. Apparently, PHP isn’t uniquely flawed like all programming languages, it is just suicidal.
Programming is an amazingly cliquish community. Every developer has a preferred language with philosophical reasoning or performance rankings to back up the choice. I love the variety we have when picking a technology, it keeps the industry exciting and nimble. However, I hate all of the constant derision that many programmers throw at languages they don’t use. I’m guilty. “I hate JavaScript, callback hell is the worst”, “Ruby is just weird”, “C# is for Microsoft groupies” are all sentiments we have heard or thought ourselves. These negative thoughts are born from a lack of understanding of the technology or through an insecure need to validate whatever tool the programmer is already using. In particular, PHP has been the constant butt of the joke.
I started using PHP a couple years ago and currently use it in a full time position. PHP definitely has its flaws, like every other programming language, but I still enjoy its simplicity, development speed and open ecosystem. What I didn’t expect to find when starting PHP, is the constant derision of the language from other programmers and even non-technical people. “I’m Andrew, I mostly use PHP” / “Oh wow, I’m sorry” is a common verbal exchange. After enough of these conversations, the negativity starts to affect you.
Impostor syndrome is a concept describing individuals who are marked by an inability to internalize their accomplishments and a persistent fear of being exposed as a "fraud”. ~ Wikipedia
Guess who got imposter syndrome? It is really easy to get imposter syndrome when you constantly feel like you need to learn another programming language. It does not matter if you create a successful app in PHP or your contributions are valued by a company. Your next thought will be “I should have written the app in Java”.
One of the cures for imposter syndrome is accepting your own accomplishments and valuing your own expertise. Therefore, I want to spread the word. If you have written an app that is valued by a company, is secure and is easy to maintain, then you are successful, no matter the programming language. If you are a budding PHP developer, don’t be discouraged by all the negativity, just build something great. If you don’t use PHP, I encourage you to look at all the web apps built in the language and give it a chance. Maybe it won’t be so bad after all: PHP: The Right Way.
Top comments (107)
Really great article! Congrats.
I think, most of people that dont like PHP, think about Wordpress and similar older codebases. They dont know "Modern PHP" with tools like Composer, frameworks like Symfony, Laravel or Libraries like TWIG or Doctrine.
And some developers are influenced by the "Hype" and only want to use the new and shiny languages and frameworks.
For me PHP is one of the most balanced languages, considering learning curve, clean code (thanks to frameworks like Symfony), performance and infrastructure costs.
All languages have its pros and cons. Talking about Node, for example, you mention callback hell, I can say a lot more. There are at least 3 different ways of handling callback funcions (callbacks, promises, and async/await). Then you have ES6. and CommonJS modules. And a new framework coming out everyday. And I havent talked about the core JS Language. NaN != NaN, Really??
People reading this might think I hate Javascript and Node, but no I really like it. I am building a Node app right now! Its just a matter of recognizing and understanding all the pros and cons and choose the most appropriate language of framework for your project. Every project is different.
Being able to recognize that is what distinguish a Top Engineer, from an average one.
In the end I just want my project to be successful, with a clean, easy to maintain and performant code. You can achieve all that with a vast number of languages. The same way you can write crappy code in any language.
You’re hitting the nail on the head. It’s really important to pick a language that makes sense for you or your team and the project requirements. It’s easy to get caught up in hype and assume one language will make everything in your app better, but that’s not true.
Thanks Andrew. My first big app that really did great things was written in php. It was very simple but reduced the wait times in the hospital I worked for from 45 minutes down to an average of 15 minutes.
Best part of was that because of php, some one like me who was more of a Ops person than Dev at the time was able to accomplish this feat. Also I agree with you about hating on languages. They are tools just like your OS. To add to your point about not knowing, I get frustrated at javascript but alot of times it is due to my lack of understanding of javascript.
Well, no you probably get frustrated by JavaScript because it was designed in a hurry and has many flaws. However it was designed and its design improves every year now.
PHP was never designed. It's just a pile of stuff that makes sense because it's naive solutions to everyday web developers problems. It's a collection of small constructs and functions to help build a Personal Home Page.
So yeah beginners find that great because they quickly get results with it. Now when you work on bigger things or when you need to go faster (because you're not discovering things anymore and it's your actual job) then PHP is just a hurdle not worth it being given the vast amount of alternatives in this world.
What bothers me is that most the PHP haters think PHP has stop in time and all the code is like Wordpress.
But PHP has evolved a lot in the last years. Composer, Symfony, FIG-Standards, Laravel, Twig, Doctrine, Blackfire and many many more.
Sure the core language has a lot of inconsistencies and flaws but still I found it to be one of the most balanced languages regarding learning curve, performance and infrastructure costs.
Anyone with enough experience can go very fast in their favorite language. I can go very fast with PHP and with clean code.
Of course, I wouldnt use PHP for everything. I recognize there are stuff that are better suited to be implemented in another language. The ability to understand that and choose the most appropriate language or framework for a project is what, in my opinion distinguish a top developer for an average one.
In my company in the last 6 months I have worked in PHP, Go and Java, and I am doing some side projects in Node so I am not a "one language" man ;)
Despite that, I would stil start most of my projects in PHP. (unless other language is more appropriate of course based on the nature of the project) Symfony is just beatuful :P
Oh I don't think that PHP stopped at WordPress, even though it comes biting me in the ass now and then.
I've setup a full development environment for a PHP team with Composer, a private company repo, a Git workflow, unit tests and all the goodness you can imagine.
That's why I know how much work it is in comparison to other languages.
Good to know. the problem is that many people who say dont like PHP take WordPress or similar for reference and dont even bother to check the latest evolutions of PHP.
In your case I respect your opinion and experience.
I like Node and Go, but still I am in love with Symfony Framework and I am really productive with it. Without Symfony probably I wouldnt have the same opiniion, who knows.
You might be more productive with another language and /or framework and thats perfectly fine as long there is respect for others preferences ;)
I have similar feelings towards node. I always loved javascript despite its flaws in the past 20 years and somehow I did not manage to like PHP even after all those new oop features and libs in the past 13 years. Probably it's because the $. :D This picture is a few years old, many things have changed since then in node too. I think the only major hardship for a node beginner is understanding and writing async code, but that part became much easier with async-await.
I'm baffled that you accept that JavaScript is evolving and improving, and then in the very same breath criticise PHP based on its origins as a completely different language over 20 years ago.
Also, if you're "not discovering things any more", you're not a developer I'd ever hire for "a proper job".
Let me take an example.
In the medical world, there is many diseases and treatments that are worth trying for each of them. However, the usual go-to treatment used to be leeching. Although some people might have gotten cured after that, I think it's pretty safe to assume that it's not an efficient treatment for anything.
I'm not saying that PHP isn't evolving. It's not designed. Not the same thing. Most of what you put in the good sides of PHP comes from the PHP-FIG which is completely unofficial because the language is not providing any kind of help on this level.
(And even there, it's mostly importing bad ideas from Java... but it's besides the point)
Also, learning and getting your skills upgraded is indeed a very important part of the job. That's why I'm checking how PHP's doing every now and then. Still crappy to me.
Make no mistake, I judge PHP from today's perspective. And I still find it's an inefficient, inconsistent and slow way to develop.
Take another example. You can buy two houses for the same price. Let's say house A and house B.
House A has a problem with the doorlock which doesn't open well and needs to be greased. Besides, everything is nice and tidy and works well.
House B has a perfectly functioning door, however there's a window cut by a wall, a patio door in the bathroom and all the faucets randomly invert warm and cold water.
Do you prefer house A or do you consider that since the lock is broken then house B is worth the fun of fixing everyfuckingthing?
That being said it's only my opinion. I respect that you would choose house B for reasons that I cannot understand.
Boy am I bored of cute analogies like this. The fact is that every language with more than two users is evolving and coping with its legacy one way or another. Yes, PHP absolutely has its problems, maybe more than its fair share, but every time I've read someone's detailed critique, they've included things which are just as bad in several other languages. So to take your house analogy, what if house A is right next door to your family and your job, but has some leaky windows and noisy plumbing; house B only has noisy plumbing in the basement, but it's in France, and you don't speak French?
Once again. Some things are used by more than two persons and are debatable. A lot of them.
However in the case of PHP I cannot see any reasonable argument to start a project with that language.
Maybe it's just me but I honestly can't see anything good in PHP.
Just about everything that you said is clearly biased against PHP. You speak as someone who hasn't used PHP7 and is mad at Wordpress for promoting poor quality (not that I can blamr you for this last point). But I cannot take you seriously when most of your points are there to artificially inflate your post.
Easy to use: yes, it really is and you haven't used PHP if you deny this. It's not even up for debate, it's one of the core ideas of the PHP ecosystem. Setup is simple and the language is very permissive. Ease of use is the main reason you get so much low quality code, there are simply a lot of beginners using it. In fact you mentioned the ease of use when talking about beginners in your first post in this thread, did you change your mind?
Your community rant is not a real argument, sorry. A language with more than 80% presence in the backend web space is going to have a huge community even when you exclude its most popular CMS whether you like it or not.
Libraries: moot point. All popular languages have many libraries, PHP included. The number is so healthy as to be considered 'enough' anyway.
Other languages are evolving: like PHP has in the past few years? PHP has just been redesigned from the ground up and you compare this to the natural evolution of your average language? Oh boy.. Are you SURE you're aware of PHP7?
Faster to work with: your personal experience does little to affect everyone else's. A purely subjective opinion.I've always found it very quick to prototype in for example.
Flaws: aside from the naming inconsistencies of the standard library and a few quirks which look like child's play if we take Javascript into account I really don't see these numerous flaws you're implying. If you stubbornly refuse to use the === operator that's your problem, not the language's.
I understand you don't like PHP and that's fine. I respect your opinion. But do not try to build arguments based on subjectivity. They get shut down fast because they have no substance. Happy coding.
I'm pretty aware of PHP 7. What's the point of anonymous classes when you're still at risk that a typo will print something above every JSON response a break the whole API?
What I'm trying to say is: I really don't see any good reason to use PHP. There's dirt everywhere you look. It's not about every single flaw, it's about all of them combined.
So what are you gonna use then? Javascript?
There are so many more options out there for server-side development than PHP and Javascript. So. Many. More.
Sure, and some of them are better than PHP, some of them are worse. There's a lot of comments on this page saying "use something other than PHP", but it would be a lot more helpful if people shared their favourite alternatives, and why they think they're worth learning for someone who already knows PHP.
I know there are more options, but the fact remains that PHP works very well in its space. And that space is wide, judging by the fact that it's used for all sorts of web apps, including APIs.
If you ask for my personal favorite, I always go with Django (so Python).
The prime reason is the ORM. It has become so powerful that I rarely need to write SQL anymore (even for very complex queries). It also provides introspection onto the data model, which allows automated forms, admin and so on. Basically any CRUD backend is done instantly. But most of all there is a migration system that gives deterministic results and works really well with versionning and branching.
Also there is the Django REST Framework which uses the introspection abilities to make REST APIs dead simple.
Then comes all the nice "batteries included" things from the templating engine (which inspired Twig) to standard RSS or sitemap apps you can just configure to go.
And finally there is a lot of apps that will help you for common tasks, like Wagtail which will provide a very flexible CMS or Oscar which does e-commerce. All those things are not in the form of WordPress/Prestashop/etc. They are developer-oriented toolkit so you can match your client's needs while leveraging pre-existing building blocks.
Basically, everything is simple and works well. That's why I like it.
Well that sounds exactly like Laravel. Perhaps you should give it a try.
I'll admit that Laravel looks like a nice piece of framework. It has a lot of good things and certainly is not too nerve-wrecking to work with.
However, it sounds a lot like Django of 2010. Just to pin one single issue down, the migrations system doesn't play well with branching. That's a serious no-goer.
sandor11 - Why do people constantly compare a framework (django) to raw php and feel that is a fair comparison? I see "x-framework vs php" statements 50x more often than I see "x-framework vs php-framework" statements.
Rowan Collins asked for people to "share their favourite alternatives" to PHP. Rémy replied with a framework once again and compared features of the framework like ORM to raw PHP! WTF? There are many PHP frameworks with ORM's and also standalone ORM libraries! Guess what Rémy. I don't use php frameworks but "I rarely need to write SQL anymore" also. And then Rémy goes on to list more libraries and frameworks as reasons why python+django+lots-of-frameworks is better than raw php by itself. That makes no sense.
Specifically saying Laravel's migration features are inferior to Django's is the only fair and sensible thing Rémy has said.
Hello no, JS is bad enough on the front-end for me not wanting to use it on the back-end.
I totally agree. Me neither can barely see a decent use case for PHP. It was a very good and fresh alternative to ASP ans CGI back then, but today is not, even for beginners or learning. I’ve read the whole thread of comments, and someone asked for some alternatives to be mentioned. Here’s a partial list, just to name the ones I know better:
Python (2003-2007, maybe I’ll come back to it. 2 prod apps): perfect language to begin with, even for kids. It is born with a design and a philosophy in mind and it evolved during the decades. Perfect tooling, and easy to jump into other fields such as AI.
Ruby (2007-, countless prod apps): I’ve used it for the last 10 (ten) years. Easy to use, but not that easy to learn well. It’s like a magic wand: you can do anything with it, but you need discipline to avoid big mistakes. I just mention Rails without further explanations, everyone knows it ;-)
Go (2012-, 2 prod apps): perfect for performance and concurrency. Very easy to learn and use, however it’s not the first choice for everything, especially web development (maybe excluding APIs in some cases). Sometimes it might be boring and require some more time and attention to get things done. I’d use it for CPU intensive tasks (image processing, number crunching)
NodeJS (2012-, 3 prod apps): well, Inuse it mostly for frontend tasks and I would never use it on the server side (I did it, of course) if not forced. JavaScript is well known for its flaws, but as a lot of transpilers (ES6, TypeScript, Elm just to name the ones I know most) that solve most, if not all, its problems.
Elixir/Erlang (2015-, 4 prod apps): my actual love! Relatively easy to learn (even if it’s totally different syntax/approach/reasoning), crazy fast, concurrent, distribuited (sort of builtin microservices), but not suitable for CPU intensive tasks (hello Python/Go/C!)
All the mentioned languages are pretty easy to learn, with awesome communities and fantastic ecosystems. Plus, a thing that is not so often considered: even a junior/average programmer in those languages has way more opportunities (in quantity and quality) for well paid jobs than a senior PHP one. Have a look at joab boards to get an idea.
Then there’s PHP, I’ve used it from 2001 up to 2008, I’ve built dozens of production apps (custom CMS engines, booking systems and marketing tools) mostly from scratch, then I promised to myself to never touch a PHP code again. Yes, it evolved in the last 10 years, good frameworks and libraries arised (inspired by Python Django and Ruby On Rails) but it’s still PHP (from a 360 degrees perspective) and their quality/productivity can’t be compared to the ones I mentioned.
Good developers tend to learn new languages, technologies, tools and patterns to get better at their jobs. They also tend to avoid PHP as much as possible 😉
I never get frustrated by JavaScript because it was designed in a hurry. I get frustrated by JavaScript because of all the baggage that comes with it in modern web development.
Oh, sorry, I'd love to finish my thought but I've got to get back to work, NPM just finished downloading the required 4 billion packages for a small change I'm working on :'(
It's funny because as I've been doing JS in some form since the early 2000s, I'd say that what I used to do and anything ES6 forward is DRAMATICALLY different and better.
I think the biggest confusion comes both from stuff like promises and the other functional aspects that can be confusing to newer devs (then again, Lisp confused the f**k out of almost everyone in college, so there you go), and separating the basics of the language from the various frameworks -- there's so many ways to do things.
And I've found your last paragraph applies to literally every technology I've dealt with. They all seem great when I first learn them, because it's new and usually for the purpose the tech is meant for. When when I have to solve problems they weren't meant to solve or maintain anything, it's boring because that's life. I wouldn't put that solely on PHP.
php is doesn't make for some situations, like java who doesn't was bad in some situations too
This is what I don't understand. Not that many years ago everyone hated JS and PHP equally.
True. Maybe it's due to PHP being on the server-side and staying bad at it whilst JS has become good at client-side. If you ask me, I'd prefer PHP over JS to do some server-side coding.
JS didn't "become good" at client-side. It got faster. PHP also got faster. It got a package management system with some good packages. PHP also got a package management system with some good packages. You can still write pure garbage JS if you feel like it. You can still write pure garbage PHP if you feel like it. Best practices in both allow you to write better code in both if you feel like it.
Well no, JS became good at client-side.
let
/const
, generators, sets, etc)async
/await
)Overall, JS became very fit at being a click handler.
On the other hand, there is no area where PHP shines. All new features are half-assed and just trying to copy the cool kids.
Just take
??
(introduced in 7.0). It's called the "null coalescing operator", yet the doc says it's equivalent to usingisset()
and notis_null()
. That's also a reminder thatisset()
should get the same underscore asis_null()
. Inconsistency is a fucking design pattern in this language and it certainly has not been cured.That's why people don't hate JS anymore but still hate PHP.
Decent libraries also appeared for php via composer & packagist.
PHP also got more useful tools built into the language like try/catch, generators, yield, finally, Constant array/string dereferencing, simpler password hashing, more internationalization time and date features, ... operator, namespace improvements, variable type declarations, return type declarations, array constants, anonymous classes, improvements around anonymous functions, more OOP features.
As for isset() vs is_null()... I just type "is" into any of my IDE's and they both show up as options. IF I were to type out isnull manually I'll immediately get an error warning. Were you writing PHP in notepad or something? Inconsistency in PHP will NEVER be cured, just like the bad ideas in JS or the DOM will never be cured. New things will be added on top and it will be up to the developer to remember to not use the old things.
I can appreciate your hate of PHP because you have experience. I'm just tired of people talking smack about one but not the other when anyone with enough experience should really be able to fairly explain what they hate about both.
Thanks for sharing, I enjoy hearing stories like your’s. Building an app that helps people save time is the ultimate goal, not picking the most perfect programming language.
It's not so much that PHP is a bad language, as PHP was designed around a way of doing things that doesn't make a ton of sense in the modern context.
Back in 1995 when dynamic pages meant serving up lots of fixed HTML with a little bit of dynamic content from the DB thrown in it made a ton of sense. The status quo at the time was CGI Perl scripts that generated HTML by literally writing print statements. I literally mean print "
$title" and so on.Enter PHP, where you could write a well formed HTML document, just escape to PHP mode in the few places you need to print out a variable or have some logic. It creator never even set out to write a full fledged programming language, he just wanted to create a little scripting language, do some includes and such. It was great for its time but its limitations show.
Web apps today don't work the same way as they did in 1995. Almost all of the code today tends to be "business logic", and people prefer not to mix code and HTML in the same file. A telltale sign is when almost every php file starts off with <?php and ends with ?> and is never in HTML mode at all, all all HTML is generated with another templating language (eg. symfony), which uses a different syntax.
In other words, despite the improvements that have made along the way, frameworks that help mitigate some of PHPs inherent flaws etc., at the end of the day PHP has outgrown its original purpose and you're really fighting it every step of the way when you're writing a modern application.
It certainly doesn't say anything bad about you as a programmer if you're in a company with a large PHP codebase or a large team that already uses PHP. If you have a legacy app it's probably hard to make the case take the time and effort and other costs to switch to a new platform. But if that's the language you choose to go with in a project without those constraints, you have to step back and ask yourself why.
The ultimate point of my article was that building a successful application is our goal as developers and we shouldn’t critique each other so heavily for choosing one language or another. I understand that PHP has flaws, but it is modernizing and can be used to make a solid web app. Many programmers are comfortable with the language and can make a good non-legacy website with it so I would be careful to not just relegate PHP to the past.
Out of curiosity, which other platforms have you seriously tried out? By seriously, I mean actually taken the time to lean and tried to build a non-trivial project in.
I'd be interested in your answer the other way around: what modern PHP frameworks have you taken the time to learn and built a non-trivial project in? Is your criticism of PHP based on genuine experience, out of date memories, or just received wisdom and prejudice?
I've used PHP for many years including a custom website that got millions of pageviews a day, and I've used WordPress quite a bit including custom themes and plugins. Yes, more recent version of PHP are better than older ones but I've seen nothing that makes me want to go back.
It's not just PHP that's got better, the frameworks and ecosystem that are available now are so different from just a few years ago. Saying you've written some WordPress plugins is a bit like saying you've written some Java applets, so don't see any reason to give a Java framework a try. It's pretty harsh to assume everyone only uses PHP because they don't know better, if you're only judging it from that distance.
Reading comprehension is not your strong suit, is it?
Maybe you should actually trying reading what I wrote.
In all your petulant posts on this topic, you've actually made zero arguments about the merits of PHP, you've just attacked other people who don't think PHP is all that great.
If you want to explain why you think PHP is so great, I'd be happy to hear about it. If not, let's just end this conversation. I don't even slightly care what language you use. If you're happy with PHP, go for it.
I haven't been giving specific examples of PHP's advantages, because that's not what this discussion was about; there have been very few concrete examples of PHP's flaws, either.
The original post was about people feeling undermined by being told that they're "doing it wrong" by using PHP. In that context, it's hard to see how else to interpret a response ending "you should ask yourself why" other than "yes, you are doing it wrong". That's quite a criticism, not just of the language, but of anyone using it.
You were also the one to mention frameworks, but you didn't actually name which ones. The implication seems to be that these are so much better than anything possible in PHP that you don't even need to try the PHP frameworks, and already know that anyone would be a fool not to switch.
I think you've effectively answered my question, thank you. I'm done engaging with you.
I don't understand why you felt the need to comment in the first place, but now are unwilling to continue. Thank you for your vague advice to try something other than PHP because it will be better in some unstated way.
I agree. The only thing PHP has going for it these days is the giant existing ecosystem (though many things therein are of questionable quality), including the drop-dead simplicity of hosting it virtually anywhere at any price point. In virtually all other aspects it's a language full of compromises and pitfalls. Yes, you can be perfectly productive in it, and as far as that concerns you as a programmer that's all that really matters. But it is rightfully the butt of jokes as a language.
"The only thing PHP has going for it is ... and ... and ..." - you remind me of the Monty Python sketch about "what have the Romans ever done for us?"
Touché. Though again, my gripe is specifically about the core language itself, which is a hot mess. That is merely mitigated by all the rest. But there are other languages which have all the rest and are good languages.
"ends with ?>" is a telltale sign that application is not written in modern PHP, as that's universally considered bad practice. PHP in 2017 is very different from PHP in 1995.
Maybe they should update their tutorial then. I sure as hell can't tell the difference.
"It's not so much that PHP is a bad language, as PHP was designed around a way of doing things that doesn't make a ton of sense in the modern context."
You mean like the whole "serverless" thing that's all the rage today, and that's baically exactly how PHP works (receive request, start a process, get query and body params, process, return response, kill the process)?
Which, incidentally, is also how you can scale horizontally by adding more servers (containers?)
If you're going to reduce things down to "receive request, start a process, get query and body params, process, return response, kill the process" then you might as well go back to using Perl CGI scripts, because your description works equally well for that.
PHP is far from unique in starting out as a very different language, and having some baggage because of that. For a trendy example, look at node.js; for a more established one, look at C; or go to the enterprise, and tell me with a straight face that Sun got Java right first time.
If you want to build your website in Erlang, or Haskell, or whatever, fine. But don't hold your breath for the world to join you.
I think a lot of people hate PHP because a lot of other people hate PHP. I don’t think I’ve ever really heard a good argument against using PHP that made me think “oh yea, PHP definitely sucks because of that reason.”
Hi Andrew,
I perfectly understand your point. I used to hate Javascript until this summer and I realized that it was because of the negativity about it in other communities.
Summer I've started working on a web app and we've built our back-end with PHP because my partner loved it and he said it's the simplest way to do the thing. To be honest, he was right. I fell in love with how naturaly and easily PHP glues together the back-end and the front-end.
So, since than, my opinion changed 180 degrees and PHP is one of my goto languages. :D
Programming in PHP can be a lot of fun and you can make great websites with it, it’s great that you discovered that. It’s interesting that JavaScript has some irritating issues, but has been able to overcome the stigma with Node.js. I’m guessing it’s because everybody has to do some JS at some point.
Marketing is a hell of a drug.
I get laughed at most of the time by friends criticizing php.
Fortunately I have found my self working with c# in my new job and I have come to appreciate the simplicity and flexibility of php even more.
Hah, I remember when PHP was one of the most wanted languages of its type, have seen it go through a major reboot, and it's still popular due to at least one successful content management system. So yeah, I'd say you're definitely not an impostor. This is all spot on.
And I started programming professionally in 2000, after four years of college, and sadly, this sort of derision of programming languages and/or tech stack in general has been common since at least 1996 from my view. I've made good money working in the Microsoft world (OMG you idiot! Real programmers use Linux and other open source! Everyone knows PostGres and/or MySQL depending on year is the best DB!), doing interpreted "script" languages (Cold Fusion, ASP Classic), working in CMSes that weren't sexy with developers, using gasp jQuery after it was cool, using SQL in general (OMG everyone is doing NoSQL now!), used graphical IDEs (yes, that's a thing people seem to hate), etc.
I've also used at least four variations of Unix, worked in various flavors of Java, used the heck out of the command line, etc. I use what works best given my constraints to do the job I'm doing. Period. The derision smacks of insecurity and having to prove your superiority somehow because you literally have nothing else to go on. Meh, I have preferences and I run with them if I can. If not, I adapt.
And for those reading, with my ~15 languages I've learned at some point and 17 years of professional development (more if you count co-op jobs in school)... I STILL have impostor syndrome. I haven't touched a lick of Python or Ruby or Scala, and if you read large portions of the internet, those are all the languages that anyone appears to use. I've barely done work on the cloud (fixing that). I've done Javascript for well over a decade, but am not as versed in frameworks as I'd like to be. I do data work but haven't done a lot of NoSQL. I'm even a couple versions behind in how C# really works, and I HAVE done a ton of that. I've never pair programmed (the idea scares the hell out of me).
So yeah, keep on going with PHP or whatever else you use, be curious about other things, but don't feel like you're bad for not doing them. The people who hate a technology probably either don't understand it, or are scared to admit they don't know something that you do.
You've not used NoSQL? gasp
Just kidding and thank you for the candor! Trendiness is something to be wary of in any industry, but particularly in programming. Adapting to new technologies is important, just not at the breakneck pace that's so often required by trends. I have learned other programming languages and what it showed me is that they are all trying to achieve the same goal (in regards to web development at least). So, all this Ruby vs PHP vs Python vs Node.js vs C# is all unnecessary if you're making a good product and you like what you are using.
I went looking for youtube videos on "NoSQL" the other day. When it came time to query the data every damn video I saw that day was using an SQL-like syntax. "NoSQL" is a poorly chosen buzzword.
True. I think the idea was that it's not a traditional tightly couple transactional database, and just covers all the other ones (document store, graph database, etc.).
It's ECMAScript > Javascript all over again.
PHP was the first language I've seriously been into. It's the only language I've know for years. I have been a professional PHP developer as well.
This taught me one thing: PHP is a piece of shit. It's utterly bad and beyond saving. Even Facebook (aka React, aka PHP applied to JS) decided they needed another language being given the crap level of PHP.
Worse, look at the code base. Most of PHP softwares are just bombs waiting to crash your server. Maybe there's a Right Way© but the culture there feels like moving a mountain.
You can build successful products out of PHP. You can also run a marathon while dragging a tyre.
Do yourself a favor and learn a decent programming language.
This comment seems to be a harsh generalization and proves the point of my article. I don’t think you should throw out the entire language or tell others what to learn just because you don’t like it. If no good software can be built in a language, then it’s fair to question it’s existence. However, if there are hundreds of pieces of functional software in a language then don’t completely write it off.
There is perfectly functional programs written in Brainfuck, doesn't mean it's a good idea.
Once again, many tools can achieve the same results.
And everybody is free to choose whichever tools they like.
But I'm sure as hell not choosing PHP, because it's the most messy and inefficient language I've worked with by far. And I've worked with JavaScript.
I always hated the derision that PHP gets, too. Or any language, for that matter - every language has its uses and flaws. The "perfect" language doesn't (nor will it ever) exist.
As you pointed out, coders tend towards cliquish behavior based on their language choices. I think that's one of the reasons I've stayed on the edges of (or completely outside of) any tech community. This being the first I've even remotely interacted with online.
PHP is generally my language of choice. It's what really got me into programming and my love for the back end. It started as a hobby in 2009, and is what helped me transition careers into web dev three years ago. Whenever people talk down about PHP, I tend to remind them that it's used in over 75% of the web. :)
That’s a great point. Sometimes I wonder if PHP’s ubiquity is what lead to the bad reputation. So many people use it that there will be more instances of bad coding in PHP than other languages.
I think that is part of it yeah. The fact that PHP is used in web development and is at first glance a relatively easy language to pick up means that a lot of people came to it from a design/front-end developer perspective. Even if you're a designer who has never really programmed anything before it is relatively easy to make changes to- or write new server-side code that "works", but it can lead to codebases written by people who lack good fundamentals of software engineering and security best practices which especially for public-facing websites can be dangerous.
This was arguably a bigger problem in the old days of PHP when the default installation of PHP had some very questionable security practices (e.g. magic quotes and register_globals defaulting to on in PHP 4) and when the built-in MySQL API did not yet support prepared statements meaning you had to manually sanitize/escape your queries to avoid SQL injection vulnerabilities (this was improved when the mysqli API was added in PHP 5, though the old MySQL API remained available and I suspect a lot of people continued using it unfortunately).
Good point. PHP’s ease of use can also be its downfall sometimes.
I know security was a common issue with PHP, but I’ve been encouraged to see the core team putting more effort in that area like the MySQL extension being removed in 7.0 or libsodium being added to 7.2.
Anything under a certain level of complexity with a budget under a certain amount is perfect for PHP. 50% - 75% of the web fits that criteria. For anything over that threshold every critique of php is perfectly valid.
But for my friend's rental car service of less than 50 cars across 4 locations on 3 islands in a 3rd world country and not being eligible for a merchant account from the local banks and losing a gigantic portion of every international money tranfer to government fees if he tried to use a foreign bank (as well as the risk of fines and imprisonment because technically no citizen of his country is permitted to have a bank account outside of the country)... well... a super simple PHP & MySQL app + a Wordpress blog all on shared hosting was an acceptable choice for his budget, needs, and available options in his situation.
But somehow the mere fact that I chose php over X, mysql over X, and shared hosting over X makes me a dumbass who'll never be capable of being a "real" developer.
Something I realized recently is that a lot of first world developers do not care about 3rd world problems, even developers who were born in a 3rd world country and eventually emigrated. Anything popular in the 3rd world is garbage and 1st world devs must not touch it or their reputation is tainted. And they also do not care about finding ways to help their fellow devs stuck living and working in the 3rd world. I asked around in a few different communities, including the php community, about expanding documentation translations to more languages and investing in keeping the current tranlations up to date. All I got were shitty responses along the lines of "If you do not learn English you will never be a good developer so translations are a waste." The vast majority of the world does not speak English. The vast majority of English speakers will never learn a 2nd language. If China/Japan/Korea/Russia/Middle East/Central Africa/etc were to create the next life-altering technology with effects as powerful as The Internet, the English world would be left behind unless the information was translated.
According to whom, exactly? People have been repeating this exact claim for years now, but I can't find a single article that actually cites a reliable source. Remarkably that exact 75% figure goes back to at least 2011. Have people been using the same technologies for 6-7 years now?
The only citation I've found is "w3techs" which seems pretty flawed. Their naive stats don't seem to take site popularity into account at all and are probably skewed by vast numbers of WordPress installations and parked pages.
75% was just the first article I pulled up (linked above). Intermittent searches over the last couple years have pulled up similar numbers, usually either 75% or 80%. Realistically, I don't think it's possible to know a hard number. Much like surveys, they only poll a small percentage of a given demographic and base the statistics on that.
WordPress definitely makes up a good portion of that. They claim to power 29% of the internet right on their homepage. To be fair, WordPress is used for a lot of business applications, so there is some development going on there.
Hi,
I work with PHP for web backend often. With Java to develop Android native apps and with Java for desktop software.
The only thing I have to say about this is that I agreee with you when you imply that the healthy choice is picking a language, an IDE and a framework (if any) due to the ability to resolve the problem that you need to address.
Putting dogma in the choice (either by falling in love with a language or hating one) doesn't seem to be the right way.