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.
Between the PHP frameworks (CodeIgniter, Laravel, et al) and CMSes (WordPress, Drupal, Joomla, et al) that are very prevalent, if you do learn PHP, it wouldnât be too hard to find a job using it somehow. Job prospects should be relatively plentiful, but not sure if itâs recommended for a beginner, especially if you want to learn the latest & greatest technologies. JavaScript and Python would be better in that aspect, along with a few other languages (Golang, Rust, et al). Heck even C#/.NET Core is getting increasingly prevalent nowadaysâŚ
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?
As a general rule, it isnât the language that I would recommend for a new developer. There is still a lot of PHP code out there being written and maintained. I think that WordPress is PHP based, so people who create and sell WordPress plugins use it. Thereâs plenty of other legacy PHP code out there, but overall the trend is definitely to move away from it. If the career opportunities that you think are most likely to come you way, then by all means learn it. If you donât have a specific reason to learn PHP though, I suggest JavaScript.
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
[citation needed]
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.
Looking at stackoverflow jobs (actual availability of jobs for languages will vary based upon location), there are 2.3 million postings mentioning JavaScript, 1.8 million postings mentioning Python, and 1.4 million postings mentioning PHP.
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âm not at the level of calling a language dead or alive. When I searched for usa in indeed, I found 10 thousand php, 60 thousand JavaScript jobs.
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âŚ
C# is mentioned in 1.5 million postings. C# and PHP just arenât in as heavy use as JavaScript and Python. Its fine to shoot for those languages if you like them, but you have to admit that youâre shooting for a smaller pool of jobs. Nobody is saying that PHP is bad or whatever. Weâre just saying that PHP doesnât have as much job availability as JavaScript.
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,
Javascript encompasses literally all frontend jobs so obvs that will be higher,
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.
Reasons you should learn PHP
- 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.
- Laravel
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).
- Money
Thereâs a lot of PHP jobs and they pay really well.
Why not learn PHP?
- 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
If you learn PHP as your primary server-side language it effectively means you will have to know at least a dialect of SQL or other DB query language, PHP, HTML, CSS and JavaScript.
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.
JavaScript is a good option because you can focus more time on just one general purpose programming language as your primary and still be able to do both front-end and back-end development.
In other words, you can go much deeper with a language more quickly if youâre only learning one as apposed to two.
The downside of JavaScript is that there is nothing out there that is even close to Laravel. AddonisJS is the closest Iâve found (literally inspired by Laravel) and itâs awesome! But it has a very long journey before it could go toe-to-toe with Laravel, its community and ecosystem.
- 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.
- Money
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.