by brailsafe · 5y ago · 0 comments
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.
I'm quite happy with the Web niche, it's one of the longest lived, the stablest, the most open, and has some of the longest backwards-compatibility records around.
I can write a website today which will work in 25 years worth of client software! I think that's remarkable.
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.
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.
It is cruel, and something Universities have been doing forever.
That's not true for Java or C#.
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.
Pick whatever you want. Just don't pick a language that is known to be on it's last legs.
It's not as 'trendy' as it once was, but it's better than ever and still widely used.
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
I’ve heard that exact sentiment over and over since the RoR community aggressively started with their anti-php agenda in about 2006.
So if you need a job you would probably have better chances knowing PHP then knowing Rust. But if in your area is raining with Rust jobs then go ahead and learn only Rust.
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