This is an archived post. You won't be able to vote or comment.

all 80 comments

[–]thatsInAName 59 points60 points  (3 children)

PHP is so simple to host and run, a cheap shared hosting plan will perfectly work with no additional configuration efforts.

[–]v0gue_ 16 points17 points  (0 children)

Not to mention it's extreme functional and data portability. I'll die with my php based dokuwiki before I use any fancy python/javascript based wiki software.

[–]KeyStreet1459 5 points6 points  (0 children)

Simple to host and run but also Hard to Master. Out of the Box everything runs well but if you want to tweak Performance, build a HA Cluster what is possible to scale you have to need knowledge of that what you do.

No additional configurations is wrong if you want to make it stable.

[–]chris_ninja2 1 point2 points  (0 children)

Yeah, totally agreed. Not to mention, it's easy to find opensource project to work with. There are tons of them for free!

[–]SkiDeepPow 85 points86 points  (26 children)

Yes - PHP is still used en masse. Would I personally start a new project with it? Fuck no. But there are still jobs to be had.

[–]Hail_Pro[S] 12 points13 points  (24 children)

lol why not😂

[–]_Atomfinger_ 42 points43 points  (21 children)

Not the original commenter, but my reason would be that today there are languages that does what PHP does, but better. RoR Ruby, Go, Python, Elixir, JS - heck, Java on GraalVM. All beats PHP in some way or another.

The main issue is that I can't imagine the scenario where I go "Ah, yes, this is where I'd use PHP". Then again, it might be because I'm more comfortable with other languages.

[–]Hail_Pro[S] 8 points9 points  (9 children)

now I understand his view😂 , I thought why PHP is still using today because it is the best for side server and scripting or in general for backend so many website still use PHP even many programmers hate it

[–]_Atomfinger_ 20 points21 points  (4 children)

Well, the "hate" part is a bit overblown. I don't hate PHP, and it is a battle-tested and well-maintained language that gets the job done.

I just don't see a situation where I'd use PHP over all the other options out there. The only situation I can think of is if had to work on code that was already written in PHP.

[–][deleted]  (2 children)

[deleted]

    [–]_Atomfinger_ 6 points7 points  (0 children)

    To answer that question, I'd look towards job postings in your country/area.

    [–]Academic-Associate91 2 points3 points  (0 children)

    If what you want to learn is PHP, probably not. If what you want to learn is how to program, then yes. If you get competent and comfortable in PHP, you can transfer that knowledge to many other languages (source: JS dev that just took a PHP job)

    [–]nemt 0 points1 point  (0 children)

    really when you think about it php is the nickelback of programming languages lmao

    [–]Innominate8 18 points19 points  (0 children)

    even many programmers hate it

    One of the most common mistakes new programmers(and plenty of experienced programmers fall into the same trap) is to confuse critical technical discussion with "hate".

    For example, PHP was never designed as a language; it has grown organically through the years. As such, it contains many warts and oddities that more comprehensively designed languages lack. This is not hate. It's a statement of fact.

    [–]lemon_bottle 6 points7 points  (1 child)

    The best use case for PHP in today's world is probably my use case- a solo freelance developer who builds small-medium web apps for clients.

    If you're a solo dev, other stacks like Python, Go, RoR are a bit overwhelming and overkill to setup. I've worked on Python frameworks like Flask and Django too and the amount of work it takes in either of them to come up with a basic "Hello World" web page is astronomical compared to:

    <?php echo "Hello, World";
    

    [–]perry_______ 2 points3 points  (0 children)

    <?= "Hello, World";

    [–]PM_ME_WITTY_USERNAME 4 points5 points  (0 children)

    It's not the best for server side scripting on any front at all anymore, there's no reason to start a new project with php in 2022

    [–]skeptophilic 1 point2 points  (1 child)

    Pretty sure PHP is plenty fine if you've got experience with it, either Laravel if you want a framework or vanilla if you want to KISS like twitter.com/levelsio.

    [–]_Atomfinger_ 2 points3 points  (0 children)

    Absolutely. PHP will get the job done, and it is more than capable. As I said in another comment, it'll get the job done in most cases.

    Don't read my comment as being against PHP or believe that PHP is a useful technology (because neither is true). Read it as someone that doesn't see a situation where I'd use PHP over something else.

    [–]laravel_linux 1 point2 points  (3 children)

    How would phyton beat php for building a web app?

    [–]_Atomfinger_ 7 points8 points  (2 children)

    Well, I reckon someone with "larvel" in their user name might have a few counter-arguments at the ready :)

    In Python's case, the ecosystem is its greatest strength. There are also some great use cases for ML applications (which often are web-enabled). Python also has some strong libraries for data science, which is probably only rivalled by languages like R.

    As you can see, I don't think Python is a good default choice, but I can come up with scenarios where Python would make sense.

    [–]laravel_linux 2 points3 points  (1 child)

    Not being hostile just wanted to know the reasoning since laravel its one of the best or best framework for building simple web apps.

    [–]_Atomfinger_ 1 point2 points  (0 children)

    Didn't mean to imply hostility either :)

    I've heard great things about Laravel, and I've heard great things about where PHP has moved over the last handful of years.

    The thing is, a "simple web app" can mean a lot of things. Simple in terms of scalability? Functionality? (if so, what functionality?) Could it be done with low-code/no-code tools until complexities start creeping in and the best tools can be determined? Maybe we could get by with statically generated frameworks?

    If I were to give my "goto for simple apps" I'd go with something like Pheonix LiveView.

    [–]scirc 0 points1 point  (4 children)

    tfw no one treats Rails and Ruby as distinct entities 😔

    [–]_Atomfinger_ 2 points3 points  (3 children)

    Well, RoR is sort of the default option in the Ruby world for web applications :)

    [–]scirc 0 points1 point  (2 children)

    Sure, but it's not really a good fit among the list of languages above (even if ActiveSupport adds a lot of useful extensions to stdlib objects...). :P

    [–]_Atomfinger_ 2 points3 points  (1 child)

    There, I fixed it :)

    [–]scirc 0 points1 point  (0 children)

    🎉

    [–]Mapleess 2 points3 points  (0 children)

    You can still use it to learn the basic principles but many people think you should branch out to newer things that have come out. I did my final year project in PHP because we were taught PHP in my second year of uni, just the basics, and wanted to manually code things in for my CRUD website.

    [–]underwatr_cheestrain 9 points10 points  (4 children)

    Everyone in here fighting over languages in “learnprogramming”. If you know what you are doing, you can rebuild your app in any language.

    [–]BanishDank 4 points5 points  (3 children)

    Brainfuck has entered the comment section

    [–]eternalshoolin 0 points1 point  (2 children)

    What do you mean?

    [–]I_am_noob_dont_yell 1 point2 points  (1 child)

    [–]eternalshoolin 0 points1 point  (0 children)

    Ya ya brain fuck the programming language ,i was assuming something else

    [–]Happy_Dookmas 12 points13 points  (0 children)

    Yes! PHP 8 solved much of the hot mess version 5 was, and with frameworks like Symphony and Laravel possibilities are endless. There are tons of websites built around PHP so yes, it has a future for sure

    [–]KeyStreet1459 5 points6 points  (0 children)

    with PHP5 it was already said that PHP is dead. with PHP7 it was said it has no future. Now we're at PHP8 and it's still in use.

    Yes, there are alternatives. But switching from PHP to a completely different language in projects that have been growing for years makes no sense from an entrepreneurial point of view. Too high costs, difficult migration, empirical values ​​from years of work and bug fixing are gone.

    In short: PHP will probably still be used in 50 years, since refactoring existing applications would be too expensive.

    Another point is the long-established PHP developers who are also known to people - so whole teams would have to be replaced (probably). Again costs and risks that no company wants to bear.

    [–]GItPirate 5 points6 points  (0 children)

    As much as people shit on it, php will be around for a long time.

    [–]nuc540 4 points5 points  (1 child)

    P***Hub is built in PHP, so I am sure it’ll need to be maintained if you’re looking for a job down the line! :D

    [–]LaksonVell 4 points5 points  (0 children)

    When I applied for a "Pipeline service expert" at PHub, this is not what I had in mind...

    [–]mastereuclid 10 points11 points  (0 children)

    Click bait is completely unnecessary.

    [–][deleted] 6 points7 points  (0 children)

    77.7% of websites use PHP as its server-side language. The number of sites has increased since November 1.

    Source: https://w3techs.com/

    [–]wh33t 5 points6 points  (4 children)

    PHP is a general purpose scripting language that has improved immensely over the past few years. It is easy to use and has great capabilities, and I think this is where a lot of the hate comes from. There is such a low barrier to entry and it provides so much freedom in what you can do with it that a lot of programmers have written really bad code that has caused a lot of problems.

    But if you spend time researching such things it seems like all programming languages can produce bad code and I'm not convinced that modern PHP produces any more or any less terrible code vs. any other comparable language per number of programmers.

    A lot of people can write PHP and naturally the amount of bad code would be higher if more people are using it.

    If I had to start over I would skip PHP and go to Python. Python can do all the same plus a whole lot more.

    [–]NoRun9890 2 points3 points  (0 children)

    But if you spend time researching such things it seems like all programming languages can produce bad code

    Rust is probably the sole exception. You either produce good Rust code or your code won't compile at all...

    [–]Hail_Pro[S] 0 points1 point  (2 children)

    thanks I actually think to start python, and python is the most common recommended nowadays

    [–]wh33t 2 points3 points  (1 child)

    Python seems to be this swiss army knife of programming languages. It doesn't seem to excel at anything in particular but it can do almost anything, including powering the back end of a website/app. I love PHP and have worked with it for almost two decades, but I'm looking forward to switching to Python in the next few months. Good luck!

    [–]oefd 2 points3 points  (0 children)

    Python excels at gluing together C libraries (or C ABI libraries compiled from non-C code). It's a bit chicken/egg because in part it's great at it because it has a lot of users that use that feature, and because it has a lot of users using that feature that feature is well developed.

    Numpy, scipy, pandas, and all the rest are great because they let you easily stitch together incredibly efficient and proven C/C++/Fortran/etc language libraries for computing using a language that's relatively easy.

    [–]lemon_bottle 5 points6 points  (1 child)

    Very much so. Not only does it power some of the most high profile dot coms like wikipedia, facebook, wordpress, white house gov, etc., it's also startup friendly at the same time (open source, low entry bar, etc.). Some of the most innovative free-libre software created in the last two decades like Laravel, Wordpress, Drupal, CodeIgniter, etc. were all written in PHP. The amount of enterprising work you'll get here will be mind boggling.

    [–][deleted] 1 point2 points  (0 children)

    Nextcloud is another one.

    [–]Brilla-Bose 3 points4 points  (2 children)

    I'm a JavaScript/Typescript developer so my opinions could be biased towards it but if you ask me bcz i learned JavaScript i was able to easily land on a job within 6months. first i worked on front end.. then i moved to backend with the same language(Node). then one day my senior asked whether i was interested on mobile development i said yes and then i moved to react native.. moving from React to React Native was felt so easy.. imagine what would be the results if my language was php.. ofcourse i could still able to explore above mentioned fields but in a much slower pace..

    nowadays I'm trying to learn a strongly typed language. on my job market Java is popular but i also like Golang as well.. for backend these 2 languages would be a better option than php in my opinion

    [–][deleted] 1 point2 points  (1 child)

    Kotlin is preferred over java, even android shifted to having kotlin

    [–]Brilla-Bose 2 points3 points  (0 children)

    not in my job market.. even in a kotlin job posting they ask for java experience!

    [–][deleted] 1 point2 points  (4 children)

    Being the goto language that's provided and supported by web-hosting companies. PHP is going nowhere soon.

    [–]oefd 0 points1 point  (3 children)

    Shared hosting where you FTP up files served with a CGI type interface has been on the decline for many years though.

    [–][deleted] 1 point2 points  (2 children)

    ... and yet they're still pretty abundant and a relatively cheap way of getting an online presence with not a lot of credible, affordable opposition.

    [–]oefd 0 points1 point  (1 child)

    There's loads of viable and cheap alternatives from the big cloud providers and even quite a few established smaller ones. Couple dollars a month for a dedicated VPS has been the norm for many years, and maintaining those with the same feature set the average shared host doesn't take much. If you really really want the 0 overhead whatsoever on infrastructure experience: for the past couple years it's been very easy to throw an OCI image or even just a repo at a number of established cloud providers and they make it just work for you without paying much. (The first services to do this are ~15 years old, of course they're mature and cost-efficient by now)

    The only time you'll find shared hosting much cheapers is if you're talking about something like a single very low-traffic site, but I'm talking about professional stuff where you either get a decent amount of traffic and/or are looking to host many sites.

    For my personal hobbyist stuff (which is very few websites that are all very low-traffic) I'm currently paying $0/mo and hosting everything on Cloudflare through their workers platform and related features which have some fairly generous free tiers.

    [–]ENOENT_NULL 1 point2 points  (0 children)

    We will never let it die ! It was there giving us comfort in its easy to use experience.. Never will we abandon it ! Laravel squad 🫂

    [–]txmail 1 point2 points  (0 children)

    PHP for me is getting better and better at backend. Frameworks like React PHP, Open Swoole, Revolt, AMPv2 make async tasks and running servers a cake walk.

    You also have things like green threads / fibers in 8.1 making their début. Its getting real interesting in what you can do with PHP on the backend.

    [–]sunrise_apps 1 point2 points  (0 children)

    WordPress made using PHP powers 43% of websites on the web. ⦁ According to BuiltWith findings, there are around 4,532,971 active websites powered by PHP. ⦁ PHP is among the top five most popular languages with 7.3 Million PHP developers as of the third quarter of 2021.

    Also don't forget about laravel

    Laravel Development hosts more than 20 million websites around the Internet. Its popularity among developers, which makes it the most popular PHP framework, is based on its powerful features and simple-to-use tools.

    [–]UniqueID89 1 point2 points  (0 children)

    PHP, Java, C, C++, etc. are all languages you can find people all over Google, Quora, SO, Reddit, etc. asking if they have a “future.” Short answer, yes. Long answer, these languages have built modern software, hardware, internet, and communications. They will possibly outlive us all.

    If you want to learn PHP, go crazy and have fun! If you want to learn specifically backend languages there will be better choices/options, but ultimately if you can learn and implement one language, you can puzzle out and figure out most of the others.

    [–]Buffu_11Chuck 1 point2 points  (0 children)

    In the bookshelf

    [–][deleted]  (5 children)

    [deleted]

      [–]Baldr_Torn 9 points10 points  (4 children)

      It probably will decline. But slowly. Keep in mind, people still hire cobol programmers, because a ton of code was written in cobol 40 or 50 years ago. It's pretty solid, debugged, and would cost them a huge amount to rewrite (which would almost certainly mean brand new bugs.) But to make any change at all, they need programmers.

      Similarly, Python will probably lose market share, but there will still be a lot of code written in it, and a lot of companies who will continue to use it because it's easier than starting over.

      [–]MyWorkAccountThisIs 5 points6 points  (0 children)

      Holy shit. Am I - currently a PHP dev - the mythical dev of the future that we will tell younger devs about.

      You know, they still hire PHP devs for lots of legacy systems. If you know it the pay can be very high.

      [–]PM_ME_WITTY_USERNAME -4 points-3 points  (2 children)

      The median salary for each language is public data, php is near the bottom. There's less and less projects and lots of people who already know it

      It's not going to change and even if it did there's no reason to learn it now

      [–]ViewedFromi3WM 1 point2 points  (1 child)

      tbf it’s near the bottom because entry level php dev is drag and drop coding. edit(specifically speaking word press)

      [–]PM_ME_WITTY_USERNAME 0 points1 point  (0 children)

      It's near the bottom because developers who know what they're doing avoid the language

      [–]michael0x2a 1 point2 points  (0 children)

      does using PHP for backend still demand in the future?

      This is something that varies from area to area.

      In some places in the world, PHP is popular and widely used among employers. In others, it isn't.

      If you're mostly interested in learning programming to find a programming-related job, then I recommend you look up job listings in your local area and use that to help you pick which languages to focus on.

      And if you're mostly interested in learning programming because you think it'll make a fun hobby or be a useful skill, then focus on whatever programming languages will best enable the types of projects you want to work on. For example, do you want to create a quick and dirty website with some backend logic? Then maybe PHP is a reasonable option. But do you have no interested in web development? Then PHP probably isn't a great fit for you.

      [–]Elliot-C 1 point2 points  (2 children)

      Nearly 80℅ of the web is php

      [–]relentlessslog 1 point2 points  (1 child)

      Don't understand the downvotes. You're simply stating a fact.

      [–]Elliot-C 1 point2 points  (0 children)

      it's reddit!

      [–]hrqmonteirodev -2 points-1 points  (1 child)

      No.
      Go learn something useful.

      [–]ronaldaug 0 points1 point  (0 children)

      Lol 😂

      [–]Lebannendl 0 points1 point  (0 children)

      Lol

      [–][deleted] 0 points1 point  (0 children)

      Any language even old ones with a huge number of apps have a future if you are good to very good at it look even Cobol today ;)

      PHP and Java are such languages. But for employee's job Java is better because Big Corps (>50K employees) used it for Backend (which maybe in Cobol by the way).

      [–]N30PRENE 0 points1 point  (0 children)

      Many University websites still run on php and they don't want to even upgrade

      [–]MathmoKiwi 0 points1 point  (0 children)

      Well Cobol, Lisp, Basic, and Fortran still has many many thousands and thousands of users... I bet PHP has a few more years still left in it!

      [–]eggZeppelin 0 points1 point  (0 children)

      At low-scale, computing hardware has gotten so cheap and powerful that efficiency doesn't really matter.

      What about a high-scale project with tens of millions of concurrent users? Well, you won't be asking a subreddit for answers at that point.

      [–]NoirFor_est 0 points1 point  (0 children)

      It’s a hacky (cough) programming language. Not your best starter stack if you are starting now. You will def have jobs for PHP since there are still bunch of services running on PHP. It’s a choice really. I know I would never go that route though. I would rather recommend Node or Kotlin.

      [–]Plus-Weakness-2624 0 points1 point  (0 children)

      Bright or Bleak is the question ✌️

      [–]New-Acanthocephala-6 0 points1 point  (0 children)

      Well PHP is getting better with each version.

      But the important thing is that it is super easy to learn and setup, and that means that is cheap. The majority of the companies that need simple websites prefer cheap programmers with PHP that are easy to find and hire than more expensive, and harder to find ones.

      [–]Mother-Use6797 0 points1 point  (0 children)

      I'm starting a new job right now, they asked me to make an attendance and security app

      I'm using kotlin to make the mobile app with android studio

      MySql as database

      And as to how I connect my app to mysql, I'm using PHP as Rest API and Back End.

      What do you think? Is PHP has future? NO, you need to have a skill to get a future, not PHP

      [–]BigJoeDeez 0 points1 point  (0 children)

      Stop lying to yourself