Would you advise a beginner to learn for the future? (For each domain) Is it generally used to make a website?
PHP is extremely prolific, although it could also be said that it’s a legacy technology, and not exactly the future of programming as it’s been around for a long time.
I still use php, as does a large dynamic community. As to whether you should learn it…i guess only you can really answer that.
Are you in an area where most back end jobs are in php, WordPress or Laravel?
WordPress etc. i do not like to use ready-made applications. I’m on my way to the frontend.
Then for now, there’s little need. You’ll be better served diving into front end - html, css, js, serverless (firebase or Supabase, for example), and consuming APIs.
I agree with @snowmonkey; front-end generally does not need PHP. You’d think of using it if you want to use the front end with a database. That said, you can do many things with arrays, loops, file handling, dynamic dates, and other functions, but instead of using the browser, a PHP server will do the work.
If you still have an interest in it, I’d take the ‘PHP is dead or on the way out’ type of comments you may see around the web with a pinch of salt. Almost 80% of websites use PHP server-side, so it’s hardly on the way out. The ‘latest and greatest or trendiest’ does not always mean they are the best. Yes, PHP has been around for a long time. Why? Perhaps because it’s good at what it is made to do.
Also, PHP does not require expensive hosting packages, unlike NODE and Python, as it is widely provided more or less as a default offering, even on really cheap hosting.
Considering how much of the web runs on WordPress and WordPress uses PHP behind the scenes, that 80% statistic is misleading when used to suggest a career path for developers.
I’m sure PHP is the best since sliced bread, but it isn’t where the bulk of the jobs are.
I don’t know, I’m in the “PHP is dead or on the way out” crowd. Yes, a lot of web sites use it, but that vast majority of that is because of WordPress, and most of the rest are legacy sites. Maybe I’m prejudiced because I just think it’s an ugly language.
If we look at what is being used in startups, php is pretty far down the list. I mean, it’s already being beat by Go and Kotlin. I suspect that a fair chunk of the startups that use php are because they are using WordPress or because they have an old CTO that cut his teeth on php.
I think that if WordPress were to switch to something else, php would slowly turn into the new COBOL, an old language that isn’t used on new projects that but that is still found in legacy systems, that gradually diminishes over time. That is just my [highly opinionated] opinion.
Should someone learn it? That is a different question. I think that there will be php jobs for the rest of our lifetimes. Who know? Maybe they will even become high paid jobs as new developers don’t learn it and there is still a need, much like with COBOL. And as pointed out, there may be a lot of php jobs where you live. You may like a field that has a lot of old php code.
If I were mentoring someone, all things being equal, I’d advise against it. But if s/he were dead set on learning php, that’s OK, too. They’ll learn a lot of important coding concepts and learn a lot about how servers and DBs work. I think there are better options for b/e languages for a brand-new coder to learn - but php (as much as I hate it) is not a terrible idea, it’s just not the best idea, imho.
My friend is a Ruby dev… A ‘dead’ language… He earns over £100k a year (in Britain that’s median salary*3.5)
Theres a fuck tonne of legacy in ‘dead’ languages that still needs dealing with,
Just look on a job board php jobs are way more in demand than say… Golang. C# even more…
On this forum I expect you’ll be pushed heavily towards JS or python though
Nobody is saying that there are not jobs in older or less used languages or that those jobs don’t pay well. All things being equal though, it is easier to get a job with a language that is more widely used and has more jobs available.
Fact is it can be worth finding a niche rather than hopping on the bandwagon
Let’s be honest node.js isn’t the one that’s going to get your foot in the door
I realize that you really hate node.js, but I don’t understand why.
It can be worth shooting for a niche, sure. But for entry level jobs for self taught developers, I recommend going for the largest pool of jobs.
Unless you have a strong reason to shoot for a particular language, then go for whatever gives you the best odds in the area you’d like to work in.
I understand loving less popular languages. I develop in C, Julia, and Rust, but wouldn’t recommend a self taught developer overlook C++ just because I don’t use it.
I like node.js a lot, it’s a great starting point for learning backend and rest apis, I tried C# and hated it,
But the fact is php and C# are heavily in demand,
As for python a lot of those jobs are going to be data related not web dev…
When I look on indeed 6.5k C# 2.5k php 800 golang granted 13k python but a lot of those will be data jobs,
And who knows maybe Americans or whatever prefer different languages and this is only relevant to the the uk… But these are the kinds of patterns that I’ve seen
But php and the like aren’t ‘dead’ by any means
If every new dev is a js dev then the value of being a js dev goes down surely…
Nobody has actually called PHP dead.
That does not actually follow.
This back and forth is becoming arguing for the sake of arguing, so I’m bowing out.
- It’s a great language for beginners.
It doesn’t take a lot of knowledge or experience to create full-stack web applications with PHP. With zero dependencies you can write dynamic templates for your front-end while also storing records in a database in your backend.
It’s also synchronous by default when using it in a web context which is generally easier to understand and think about.
- It’s well supported, well maintained and mature.
There’s a massive community of PHP developers and a ton of extremely high quality free and paid content out there. Easy to find help when you need it and most services out there support PHP whether it be an SDK for Stripe or hosting on Digital Ocean or even running Lambdas on AWS. PHP is too big for companies to ignore so they have to offer some sort of support for it in one form or another.
This means when you go to use a 3rd party API, there will likely be documentation showing examples with PHP and will probably even have an SDK that you can download that already knows how to work with the API so you don’t have to run a ton of custom code yourself.
I still have not seen a web framework as complete, cohesive and simple as Laravel. It’s crazy how fast you can throw together an application with quite a lot of functionality and security features all while being very approachable to beginners.
No framework is suitable for someone who hasn’t learned how to program yet. But once you’ve built a few simple apps and feel ready to move onto a framework, Laravel is probably going to get you the most mileage as a beginner.
- It’s pretty fast
PHP is more or less the fastest dynamic language. And now that you can run PHP asynchronously with tools like Swoole and Laravel Octane it’s just even faster.
Yes there are faster languages. For a lot of apps the language isn’t the bottleneck and cost of infrastructure is negligible as long as your business model doesn’t depend on millions of visits to make a few dollars in revenue (think click-bait sites that make their money off ad revenue).
There’s a lot of PHP jobs and they pay really well.
- You’re already learning something else
Programming languages don’t matter that much. So if you’re already learning one, might as well stick with it until you reach a basic level of proficiency. After you know how to build stuff using any language. Then maybe consider picking up a new one, but ask yourself “why” first.
- You want to be fullstack but don’t want to know more than one language
That doesn’t include all the other stuff you still have to learn in order to tie all of that together and actually build an app. Decreasing the amount of syntax and languages you need to know can help you become a fullstack dev faster.
In other words, you can go much deeper with a language more quickly if you’re only learning one as apposed to two.
- It can be a PITA
PHP is the only language I know of (and I don’t spend much time with low level languages just FYI) that can interpret a line of code differently depending on how it was configured. And I don’t mean the difference between using strict types or not.
I mean the language has an entire file of config values that can be very different from one environment to the next.
It’s also an extensible language. Which can be thought of as a good thing I guess, but in my experience it’s just a pain. PHP is written in C and you can extend the language by writing plugins in C. Basic things like being able to write to a database requires a plugin to be installed and configured correctly with your binary.
None of this is really a big deal when you’re using VM’s or docker but as a beginner I think that’s a bit much to ask. Most beginners working with PHP will use something like XAMPP, Valet, or Laragon to get it running locally on their computer which are all fine options. But when you work on multiple projects that expect different configurations of PHP you can burn a lot of time just sorting things out.
There are a lot of jobs that don’t use PHP and they also pay really well
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.