7 ms·
This seems like a false dichotomy. Is php totally worthless in 2021. Absolutely not. Is php the best language to spend your limited time learning in 2021? Al
by anm89 5y ago
This seems like a false dichotomy.
Is php totally worthless in 2021. Absolutely not.
Is php the best language to spend your limited time learning in 2021? Almost definitely absolutely not as well.
- cityzen 5y agoDid you read the article?
- brailsafe 5y agoBut, what is, if not php? Do you shoot for what has had longevity, or what's rising?
- guitarbill 5y agoIf you could predict the future, it'd be easy. And you can pretty much learn any language. The question is who's hiring/where will you work, and what will you work on? In my area, there aren't many PHP shops. So it could be Wordpress or Facebook/Meta. PHP might be long-lived, but if you have to relocate to find a PHP job, does that help? Same with e.g. COBOL, Sharepoint, etc. And to be fair, what's rising has that problem outside tech centres. Something popular like Python is generally a "better" investment, covers more bases.
- eyelidlessness 5y agoI can’t tell if you’re arguing for PHP or against COBOL. I kid, but a lot of the other languages/ecosystems people will consider investing in are at least as old and evolving right alongside PHP. Many of them with very similar evolutions.
- brailsafe 5y agoYa that's basically what I was getting at. Not about COBOL, but about others that are similarly long lasting in the market, dynamically typed, and general purpose.
- anm89 5y agoBut what is, if not Visual Basic? Do you shoot for what has had longevity, or what's rising? But what is, if not Motorola 68000 Assembly? Do you shoot for what has had longevity, or what's rising? Pointing out that there is not absolute certainty about what is the top choice for a better idea does not make php, or visual basic, or 68000 worth spending your time on in 2021.
- anm89 5y agoFine: python, ruby, go, rust, elixir, c, java, javascript, plenty more. Pick whatever you want. Just don't pick a language that is known to be on it's last legs.
- brailsafe 5y agoYa, but PHP is actually still being used in a lot of agencies and in certain types of work. Far more than elixer and rust, probably just below ruby. Also I wasn't pointing out what you say, you're reading into it a bit. I haven't used PHP in a long ass time. But it seems like not a bad choice for certain markets, at least as much as Python and Ruby imo
- anm89 5y agoCompare what the PHP jobs pay or the career path they put you on compared to elixir or ruby. Not even the same ball park. Not even the same sport.
- skinnyarms 5y agoPython, JavaScript, Java, C# have all had great longevity, and much more popular, and can do anything that you can do w/ PHP and a whole lot more. Encouraging new programmers to learn PHP is cruel.
- brailsafe 5y agoEncouraging new programmers to learn Java isn't cruel? "Son, today is the first day of a long journey into enterprise software development. Yay" It is cruel, and something Universities have been doing forever.
- skinnyarms 5y agoYou prefer customizing wordpress?
- dragontamer 5y agoI'm still seeing shared hosts offer PHP everywhere at very cheap prices. That's not true for Java or C#.
- lmm 5y agoJava and C# are not website-first languages and have never been popular on webhosts. They're still very widely used, maybe even growing; certainly I'd bet that both have a better growth rate than PHP at the moment.
- vegai_ 5y agoIf you have to learn a new language for some reason and you don't know what to pick, go for something that has things you've never done before. Perhaps consult TIOBE for extra data points if you value current popularity. Some popular choices in this bubble seem to be: - clojure - common lisp for some reason - php is mentioned often here, also not sure why - rust - swift if you're into ios/apple, kotlin if you're into android - typescript
- solraph 5y agoIt depends on what you want to do. The problem is that PHP is hyper-optimised for serving up HTTP. That was great in the 2000s when the web was eating the world and the other options were Java, Python, and Perl, but is less useful in the current climate where there's so many more platforms and web development requires javascript. By learning PHP, you are effectively locking yourself into the narrow niche of backend web development (ask me how I know!), whereas other languages have much broader target platform appeal. As an example, the obvious competitor to PHP of Javascript already beats PHP by also providing backend web services, but also has support from AWS lambda, GCP Cloud functions, and even the somewhat esoteric embedded javascript for micro-controllers options. > Do you shoot for what has had longevity, or what's rising? Coming back to your original question - I think it's both. Depending on what you wanted to do, I'd pick Javascript (see above), then depending on what else you wanted to do, one of Golang, Python, C#, or Kotlin.
- FranOntanaya 5y agoPHP pays my bills. I don't use it for web backends, it runs automations for a number of operations that glue APIs together, as well as exporting some custom document types and sorting out workflows/data. Simplistically speaking, all I have to do is stick the path hashbang at the top of a php file, follow with the business logic and run it as a shell script. Clears any urgent ad-hoc request within a day.
- joelbluminator 5y agoBest since everyone is thinking along the same lines Javascript/Python/Go developers are quickly becoming a commodity; e.g there are millions or tens of millions of developers who learn them as their 1st language (many of them are now hirable remotely). Just worth noting I think...
- solraph 5y agoFrom brutal experience I can tell you that's also been true for PHP programmers for a long time.
- 5y ago
- wly_cdgr 5y agoWhy are y'all arguing about this when you already learned like 20% of php by reading the OP. Learning enough of a high level scripting language like php to be able to be useful and productive in it is not some huge time sink, it's a few dozen hours of reading docs and tinkering
- echelon 5y agoOpportunity cost. Those "few dozen hours" reading PHP docs and tinkering could also be used to learn Python, Ruby, or Javascript, each of which are almost certainly better choices with broader applicability and more modern ergonomics. Python gets you web backend + ML, Javascript gets you web backend + web frontend. Ruby gets you a multi-paradigm language with nice ergonomics and cats. PHP gets you job offers customizing Drupal and Wordpress websites. If you already know a "scripting language most popularly used for websites", then you could choose to pick up Rust, Nim, Go, Swift, or Kotlin instead. It's much better to have a new kind of tool in your belt than a second hammer. The world is full of so many choices. PHP has a lot of incredibly compelling alternatives. Unless your job demands PHP, you're probably better off looking elsewhere.
- aliswe 5y agoNot that I code in PHP anymore, and I havent for years (felt like I had to say that). But PHP is a quite nice language with a lot less ceremony than many other languages. Especially nowadays as the article says. Go make a Wordpress site!
- JoshuaDavid 5y agoI mean if you tinker around with programming languages a lot, odds are pretty good that you have also spent a few dozen hours on Python, and another few dozen on Ruby, and it's probably pretty hard to avoid spending dozens of hours mucking about with JS even if you don't like learning new languages just by virtue of it being necessary for writing web stuff or scraping stuff off existing webpages. So yeah. Don't make PHP your first language. Probably not your second either. But if you've played with Python, and learned to write the simplest and clearest thing that can possibly work, if you've worked in C, and decided that's as close to the bare metal as you ever want to get, if you've learned enough Java to know when to use the SeriousBusinessFactoryProxyInterface, if Haskell has made you realize that programming is really just math... then sure, learn you some PHP, write a toy web project and discover that the simple things really can be simple. I still don't know of any stacks where it's easier to write a simple, low maintenance side project that will stay up for years without issue, where multiple projects can share a $5 / month VPS, than the LAMP stack.
- codegeek 5y agoThere is never a best language. You make it sound like PHP is almost worthless in 2021 which is also not true.
- vegai_ 5y agoThere is probably a set of "good languages to learn" for every individual. There are two good reasons to learn a programming language: 1. You're using it for actual work 2. Learning it will teach you something fundamental I feel like the only way 2. might happen with PHP is if it's the first language you're learning.
- mike_d 5y agoPHP was my gateway to understanding C. It wasn't my first, but it definitely helped me learn more computer fundamentals than other languages.
- deleted 5y ago[deleted]
- vegai_ 5y agoCan you pinpoint anything in PHP that allowed you to gain such knowledge better than whatever your first language was?
- mike_d 5y agoI started with BASIC, then shell scripting, then an internally developed language similar to COBOL. Being self taught I didn't really "get" data types, so the big names at the time like C and Java made no sense. PHP was a crutch that allowed me to learn and experiment with functions that were pretty forgiving. The eventual type related bugs I'd introduce into my code where it would work but not correctly eventually helped the concept click in my brain. I still don't get Java.
- scoopertrooper 5y agoI felt like PHP set me back as a first language (many moons ago). It just works so differently to other languages.
- deleted 5y ago[deleted]
- pjmlp 5y ago> Is php the best language to spend your limited time learning in 2021? Almost definitely absolutely not as well. Depends if you want a job or not. At least in many European countries, there are plenty of them doing PHP. In fact, when doing our Java and .NET consulting sales for Web projects, PHP is the adversary, not Python, Ruby, Go, Rust, or whatever is on the frontpage, like everyone likes to discuss over here.