4 ms·
The only reason to learn PHP in 2024 is if you are specifically targeting PHP jobs. Learning PHP is like learning Perl: suboptimal. Edit: Jesu X. Chris, I did
by djaouen 2y ago
The only reason to learn PHP in 2024 is if you are specifically targeting PHP jobs. Learning PHP is like learning Perl: suboptimal.
Edit: Jesu X. Chris, I didn’t mean to start a language war. Learn PHP if you want, I won’t stop you lol
- LoganDark 2y agoPHP is usually the only option for running server-side code on shared/managed hosting. (Either that, or a version of Ruby from 2004. Do you want to use Ruby from 2004?)
- brightball 2y agoBoth have their uses.
- djaouen 2y agoI am not saying they don’t. I am just saying there are (except in a few rare cases) better uses of your time.
- archerx 2y agoPlease give me some examples!
- djaouen 2y agoLearn a functional language like Elixir. That’ll prove both useful and mind expanding!
- archerx 2y agoHow can I use Elixir for the web, microcontrollers or making games? How can Elixir make the development of those things easier/better?
- ecjhdnc2025 2y agoElixir looks great. It reminds me of the functional and pseudofunctional programming languages I used at uni and their environments like Poplog. I agree it's mind-expanding. But I don't think most web development work is mind-expanding or a realistic application for it. I also don't think using it to criticise PHP is really the right target. If you want to use a functional programming language/environment as a critique of modern web development... maybe start by targeting server-side JS.
- brightball 2y agoUsing Perl for sysadmin work and living life in Regex for a while has its perks too. ;)
- exodust 2y agoAfter learning HTML, CSS and Javascript, PHP is a good next choice on the path to self-learning web development in 2024. The whole idea is to achieve "world is your oyster" with the minimal number of steps. Don't agree? That's fine. Web development isn't meant to be dictated to others.
- ChrisMarshallNY 2y ago> if you are specifically targeting PHP jobs Lot of those around[0]. [0] https://w3techs.com/technologies/history_overview/programming_language/ms/y https://w3techs.com/technologies/history_overview/programmin...
- kristopolous 2y agoThere's certainly a ton of use cases where php is a few minute job and anything else is 10x more or even longer just like is true with shell scripts and perl Snobbery is like saying you're intellectually superior to using a specific screwdriver or kitchen knife.
- forgetfreeman 2y agoOr they're simply committed to using the wrong tools for the job out of some misguided ideology someone else handed them when they were too new to know better.
- archerx 2y agoPHP is so much nicer to use on a webserver vs Python or JS. It’s almost like PHP was built for the web and fits it like a tailored suit! Would I use PHP to make games? No! I wouldn’t use JS or Python for that either. I try to use the best language for the job without letting any cargo cult biases get in the way. Front end stuff? JS! Backend stuff? PHP! AI stuff? Python! Games and microcontrollers? C/C++!
- wiseowise 2y ago> PHP is so much nicer to use on a webserver vs Python or JS. How?
- diggan 2y agoOne thing that I think is under-appreciated from the perspective of "getting shit done" is that the default model of PHP makes it really hard to have memory leaks that eventually crashes your app/server, as your PHP script has a defined "start" and "end" that are all within the request lifecycle. So even if you leak horribly, thanks to Apache/Nginx/Caddy/whatever only launching your script and then your script stops running, it basically doesn't affect you at all. Granted, this is more like a bandage, but it works out great for beginners who just want to create their own personal dynamic homepages, something PHP does great :) Compared to Python or JS where the standard practice is creating a server that runs constantly, and if you leak memory somewhere, your application eventually crashes as you run out of memory.
- cwillu 2y agoBasically, PHP was using arenas before arenas were cool :)
- archerx 2y agoA lot of the vanilla inbuilt functions are very web oriented and if you like C, it feels very similar but much easier.
- bearjaws 2y ago
- patmorgan23 2y agoDisagree. Laravel is a great productive framework and there are actually a lot of high paying PHO jobs
- InsideOutSanta 2y agoI think for probably more than half of all websites out there, something like LAMP is either the optimal, or very close to the optimal solution. It's absolutely bonkers to me what kinds of tech stacks people use to render what essentially amounts to a bunch of forms.
- CM30 2y agoAt least half of all websites would probably be better of if their creators realised they needed something closer to a 'blog' than a 'web app'. It's especially true when it comes to the media industry, who seem to love creating the most over engineered SPAs possible for functionality that's barely changed since the 90s.
- bearjaws 2y agoI'd say swap out MySQL but yeah, a CMS is 99% of what you need.
- jim180 2y agoAfter spending many years on Objective-C/Swift, I had a couple of opportunities to work with Django (Python), and then Laravel (PHP). I'd take Laravel with Livewire (and some Alpine.js) over Django any-day. Plus my gut feeling says, that React would be as pleasant as Laravel and co.
- rob 2y agoNot if you're trying to make money and learn Web development. PHP is king. I'd rather get paid $1,000 to build something that takes < 1 day and $50-150/month to maintain something on a $20 VPS using a tried and true Web technology with tons of developer support and a stable ecosystem. I can start a new Laravel project and with a starter kit have 50% of the site done. Auth's already done out of the box. The ecosystem is amazing. The tooling is amazing. WordPress is amazing and its ability to extend itself and build almost anything you want is amazing. I'm moving on to the next client while someone is crying about WordPress' arcane database structure or code and they're still sitting at a text editor with some Haskell code. All I have to do is worry about my project, not create OCD for 2 weeks on the best way to set something up out of 10 different ways. I'm not worrying about which flavor of JavaScript framework is in popularity this week - I'm not worrying about how to deploy my Python app and setting up Kubernetes. I'm not worried about compiling my Elixir project to WASM and deploying to Fly.io to support my 1 visitor a month.
- ChrisMarshallNY 2y ago> I didn’t mean to start a language war. Lot of that going around; especially in venues like this, which has a lot of "Ooh! Shiny!" going on. I tend to be a bit more conservative than many; but not to any kind of extreme degree. I like new stuff, but I also like shipping, which doesn't come from the bleeding edge. Personally, I use PHP on my backend work, mostly because it's a known quantity, and is an industrial-strength, massively-supported system, that is not going anywhere but up. And I don't feel like learning a whole new language and API, just for some relatively minor-scale server work (I spend most of my time, writing native Swift frontends). If it's good enough for PornHub, it's good enough for me. That said, if PHP were, as is often falsely claimed, going away, I'd probably learn something new. I doubt it would be the tip of The Shiny Spear, but it would be a more modern system; maybe Python. I've never actually liked working with PHP, but the same could be said for most languages I've used. I like Swift. As it is, I would still want to learn Laravel, before moving away from PHP. From what I understand, it's a fantastic framework, that makes PHP a much more effective server system.