5 Reasons why PHP is not dead in 2021

PHP certainly has had better days but is it really dead here’s why it’s important and why it will stay important and what this means for you as a newcomer to web development and also for you as a more experienced web developer if you browse the web if you stay updated if you read on stack overflow if you read blog articles related to web development you’ll often find articles opinions where people essentially share their opinions regarding php being dead now it’s important to understand that just because you hate php or you don’t want to work with it anymore or maybe you never did work with it doesn’t mean that it’s dead and a simple look at the numbers is enough to prove that of course there are different statistics but in the end we can say that roughly around eighty percent of all the web pages out there are powered by php that’s a pretty high number for a technology that’s dead now we also have this high number because wordpress uses php and wordpress alone powers a lot of web pages around 30 of the entire web now other content management systems like drupal or joomla also use php and they also of course account for a significant share of all web pages out there and the same is true for popular shopping shop management systems which also are built with php and therefore any web page that utilizes them also uses php so we have all these big market champions these big content management or shop systems that use php that kind of leads to php being important now you could still make the argument that for anyone writing real code and we should put that into quotes because obviously you can use wordpress and still write real code but for anyone who’s building a website from scratch let’s say that those people might not want to use php anymore but even that is probably not correct we must never forget that php is very popular and is very popular since ever probably because it’s also very easy to learn it’s easy to learn and that’s great for newcomers now most web developers i’d argue who have been around for a bit longer probably started with php or at least somehow worked with php at some point of time i personally for example started with php of course not just php i also had a look at javascript back then but to be honest when i started with web development so around 18 years ago javascript really wasn’t a big thing there was no node.js there were other suicide languages and technologies but those were way harder to pick up and everywhere you found books that basically taught you how to build a web page with php and mysql and that was amazing because that is what you wanted to do if you were starting off you want to build a web page where things are dynamic where you have a database and where all of that can be achieved in a couple of hours or days and you have something basic working and that’s where php really shines now of course nowadays we have so many tutorials and we have more technologies for example node.js i’d argue if you know some javascript is also fairly easy to get started with um if at least if you use a framework like express but php is very easy to learn from scratch with no prior knowledge required that’s why it was popular and why it of course still is popular with newcomers now this simplicity also is kind of the reason why many people i’d say hate php over time and php has been around for a long time the language kind of got cluttered with stuff there are tons of different ways of building one of the same thing and most of the ways of achieving this are really hacky so you can easily write bad php code obviously you can write bad code with any language but i’d say php makes it a bit easier because because of the way it grew over time there’s a lot of old stuff in there which makes it easy to get started with it but if you then stick to that stuff and you don’t move towards other solutions on how you may implement something as you progress in learning php if you stick to the simplest way of doing everything you can quickly end up with applications that are really not following best practices that are hard to maintain that might not have the best performance and that overall kind of just aren’t nice to look at if we think about the code if you look at the code not the end result so that’s why php is also i’d say hated by a lot of developers it’s really easy to write bad code you find a lot of bad examples out there um it’s not always clear how to best solve something because you have so many different options and there are bad options in there and the syntax overall just isn’t that beautiful to look at at least if we have a look at all these strange helper functions you have in there that’s something you don’t really find in that many other languages and therefore many other languages kind of force you to write cleaner code which ultimately as you grow as a developer is what you want to do and therefore more experienced developers tend tend to prefer other languages is probably wrong but probably see why you could hate php let’s put it like that so this is why some people hate php now i’m by the way not one of them uh i still like php though to be honest i i rarely write raw php um now it’s been some time since i’ve worked with php in any form but when i work with php i typically like probably most developers work with frameworks and that’s not just true for php it’s the same for node.js for example where you kind of always use express or some other framework for php it’s the same and there are huge popular frameworks out there and one of the most popular and cleanest and most fun to work with frameworks you can learn is laravel larawell also already is quite mature i think eight years it’s eight years old and it really has has made awesome progress over time and now it’s such an amazing framework really easy to get started with and so powerful you can basically build any kind of application with layer will and you will use php there obviously because level is a php framework but you don’t really see that i’d say obviously the language you use as php you use the php syntax but all the dirty things php includes you kind of are navigated around that because of the schema and the the syntax level forces you into and therefore if you for example learn php by starting off with letter will or by quickly switching to it or comparable frameworks of course you kind of get the best of both worlds you have the simplicity php offers you find tons of resources on php obviously you’ll also find tons of jobs because well 80 of the websites are powered by php in some form so probably there are a lot of jobs and you have a framework that forces you into some cleaner code so my argument would be that php of course is important the numbers tell us that but it will probably also stay important because you’re not going to lose 80 of the web pages overnight will therefore have a lot of php jobs out there obviously because someone needs to work on all these web pages and we have solutions like letterwell or our frameworks that also allow us to write cleaner code and better applications with php so all these discussions about whether php is dead or not yeah you might hate php sure you might not like the syntax you might not like the way the language works but to be very honest you don’t have to use it it’s certainly not going anywhere though and it’s also hard to say whether node is batter or java or whatever your favorite server-side solution is there is no better solution in general for very specific use cases you obviously might have one technology that’s better than another one but i’ll be very honest for most websites that won’t matter you’ll know it if you’re building something so specific that you need a specific technology to handle it for most web applications and i’m not just talking about small site projects i’m really also talking about large web applications for most web applications it really doesn’t matter facebook for example was built with php and still uses a ton of php for sure so for large applications you can still use php and that even sounds dumb because it sounds like php would be worse it isn’t and we could turn this video into a technical video too i could talk about performance you could run benchmarks but to be honest benchmarks are always kind of a tricky thing you can always measure what you want to measure it’s hard to tell where which technology is better and even if you have like a small fraction of of milliseconds off of edge in in one benchmark in technology a against technology b that a might not be reproducible or b not applied to your web solution with your web app you’re building or a c it might matter but ultimately it’s such a small difference it might still not matter because you’re not having thousands or hundreds of thousands of visitors so performance measurements and benchmarks should always be treated with care they can be interesting but you should always have a look at what’s getting measured and i’d say the most important thing for you is to find a language or a technology that you like where you like the syntax where you like the frameworks that are out there where you have sufficient resources to learn it and also then to master it and to dive into advanced use cases where you have an active ecosystem and community so that you don’t have to reinvent the wheel over and over again and php for example is really strong there obviously nodejs all days now and then other server-side languages too but this is what matters this is what you should have a look at if you’re choosing a language to learn and if you like php well well stick to it there’s no reason to change a way it’s still under development there are new versions of php released uh we have active frameworks like larawell there are tons of jobs probably not all paid that well because we also have tons of php developers but if you’re good you’ll always find a well-paid job so stick to php if you like it of course stick to node or to whatever language you use if you like that just don’t think that a or b is dead if you’re not liking it doesn’t mean it’s dead now these are my two cents on the topic what do you think what’s your opinion on the future of php what’s better php node.js which server-side solution.