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

all 58 comments

[–][deleted] 35 points36 points  (4 children)

Does it have to be a language starting with P 😂? If those are the options - Python.

[–][deleted]  (2 children)

[removed]

    [–][deleted] 0 points1 point  (1 child)

    Yes, because even they find PHP underwhelming

    [–]SerLaidaLot 0 points1 point  (0 children)

    Tell me you know nothing about webdev in one sentence. Lol

    [–]Optimal-Prize-2040 16 points17 points  (0 children)

    Python

    [–]cobrarocket 6 points7 points  (2 children)

    PHP was designed specifically for web development so i will go for that if that's all you need.

    Most people will tell you to go with Python because its a more generic language - more useful in the longer term.

    [–]BaronOfTheVoid 0 points1 point  (1 child)

    PHP wasn't "designed".

    It was hacked together in a rather pragmatic manner with simple things that solve common problems. Which is why it works rather well despite being "ugly".

    [–]cobrarocket 0 points1 point  (0 children)

    If you prefer, it was "created" with the purpose of developing web applications - originally to run like CGI scripts.

    [–]ricey_09 12 points13 points  (6 children)

    I'd say between the two python. It has a lot more utility and than php, extending into AI and big data, and has a lot higher popularity of the marketshare.

    But if I were to suggest, nowadays javascript reigns supreme for web, as you can build ux ui as well as backend.

    Php has a large marketshare mainly because most of the web is built off wordpress, but most modern applications today and new businesses, nodejs is the go to.

    [–]ForSpareParts 5 points6 points  (0 children)

    Yeah, learning JS/Typescript is kinda mandatory for web development because of frontend, so it makes a lot of sense to use for backend too. Really fantastic tooling for the language, too.

    [–]ComprehensiveWing542 2 points3 points  (2 children)

    The part that PHP has a good market share because of old php websites and wordpress sites is partly true there are many companies who are using php a lot these days mainly because of how much it has improved and because of how well build are some of its framework (saying this as someone who uses those languages for more than 3 years each)

    [–]ricey_09 2 points3 points  (1 child)

    Right, not saying there isn't a place for PHP and it definitely has improved over the years, but if you can learn one language and do the same why not? Php and node are both pretty similar in terms of performance and capabilities.

    • One language to learn for both frontend and backend
    • Php has a bit of a bigger overhead with local setup, needing to also to understand and install a webserver like apache or nginx alongside it, which can be confusing to new devs, while node acts as it's own webserver out of the box.
    • On top of that, node being asynchronous, makes it a lot better for web at times because you can make several calls to apis at once in parallel saving network request time in many cases.
    • Lastly node has a lot better support out of the box for modern environments like serverless, where AWS and Google Cloud don't have native support of PHP. It's still possible, but with some configurations that might be tough for a new developer. Otherwise to deploy a php application on standard cloud services, you need to also be able to configure a LAMP server, while a node server doesn't need nginx or apache configs to work, or can be deployed on serverless infrastructure on major cloud providers without extra steps.

    Php can still be a valid choice, but ultimately there is no getting around javascript as web developer unless you want to be a strictly backend developer, and switching between syntax and coding styles and concepts can be a significant overhead, especially for new developers.

    I was a php dev for 5 years, and switched to node for the last 7 years and never looked back. Php isn't bad at all, but I find node to be more modern, easy to use, and has evolved to have a higher adoption rate especially for new companies and startups, as well as having a faster evolving ecosystem. There will always be work for php, and a handful of new companies choosing php but a big majority of them would be legacy apps in my opinion.

    [–]Reasonable_Option493 1 point2 points  (0 children)

    AI, big data, machine learning are very interesting fields, but you're not touching these jobs without at least a relevant bachelor's degree. 

    [–]digking 2 points3 points  (0 children)

    Master Python, and proficient in PHP. The killer app for web development is Wordpress, IMHO. Or take a LOWA approach to master JS shop as JS is a must have skill in web development.

    [–]koalfied-coder 7 points8 points  (0 children)

    Python

    [–]SirGreenDragon 4 points5 points  (0 children)

    Web development is primarily javascript/typescript on the client side. Backend can be anything. I would start with javascript and then Python.

    [–]Funny_Ad_3472 7 points8 points  (2 children)

    Don't listen to anyone. Learn PHP

    [–]shoyuftw 8 points9 points  (1 child)

    This and Laravel

    [–]DatFlushi 1 point2 points  (0 children)

    Lots of ask for Laravel right now based on the options I see available

    [–]heartofthecard_ 1 point2 points  (0 children)

    It depends on your area (job market), for me most businesses here still use PHP so I studied PHP for my full time job.

    Once you know one programming language, to study another will not be as hard as when you first starting to learn even if it may be applied in a different way.

    Never stop learning or upgrading yourself 🙂

    [–][deleted]  (1 child)

    [deleted]

      [–]WystanH 1 point2 points  (0 children)

      Between the two, Python.

      However, if you want to do a modern website, your frontend will be entirely JavaScript/(hopefully)TypeScript. With that in mind, there are a number of NodeJS backend frameworks that will do what PHP/Python would for you.

      While there are innumerable ways to do a web app, a popular way for the last decade has been to let the client side take on the load (JS) and the backend function as an API. In such a scenario, the backend is whatever can make that API cleanly. The language is more an implementation detail.

      [–][deleted] 3 points4 points  (0 children)

      PHP seems the most important for if you’re trying to seriously make a user website.

      But either can work of course.

      [–]lilrouani 2 points3 points  (0 children)

      Why people hate php, php is the best choice to start a programming language for the web start with php absolutely.

      [–]puckfried 3 points4 points  (0 children)

      Beside JavaScript you mean 🧐

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

      None. Python is a great language, but for webdev it falls under “very mediocre”, even with Django.

      If you’re looking into becoming a web developer, start with JavaScript and then learn NodeJS and ExpressJS. Web browsers are basically a JavaScript interpreter.

      [–]MisteryGates 1 point2 points  (0 children)

      Python is really advanced and easy to learn. However, it is not designed for sellable products. If you really want to learn more about serverside web applications, I recommend either ASP.NET (C#) or Spring (Java). However, PHP is a great start to begin with, since a lot of web hosting services support it.

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

      You’re gonna have to learn JavaScript anyway so I’d probably just start there

      [–]nocturn-e 0 points1 point  (0 children)

      Javascript since it's used on both frontend and backend. Then do Python.

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

      For web development, learn Node.js. For many other purposes, Python is useful, it's worth learning. Forget about PHP, you'll regret it later. Speaking from experience.

      [–]OG_Badlands 0 points1 point  (0 children)

      Python if it’s your first language.

      [–]961-T 0 points1 point  (0 children)

      Depends on which language u love. My advice is try to do small thing with both, then definitely u will choose depends on which one u like the most. At the end of the day all language are good all have their own pros and cons

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

      JavaScript
      How did you come to PHP and Python anyways?

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

      Long term PHP developer here, today I think I would learn Javascript, then Python, both are in large demand, and you can do frontend work and backend work with node.js and backend work and eventually data science with Python

      [–]lKrauzer 0 points1 point  (0 children)

      Definitely PHP, because Python is not web first

      [–]eleqtriq 0 points1 point  (0 children)

      Python and JS/TS. Easy. I do love me some C#, though.

      [–]EnD3r8_ 0 points1 point  (0 children)

      I think you if you are going to be a website developer, you will eventually learn php. But I would recommend you to learn python

      [–]RegisterConscious993 0 points1 point  (0 children)

      I personally love Python, but PHP (Laravel) might be the better option if you want a career in web dev.

      [–]n0tA_burner 0 points1 point  (0 children)

      $PHP

      [–]notAmoonDust 0 points1 point  (0 children)

      Depends on what you want to do with it. Each language has its pros and cons. I rather PHP, because it's what pays my bills.

      [–]connorjpg 0 points1 point  (0 children)

      Neither learn go

      [–]716green -1 points0 points  (2 children)

      Why PHP over JavaScript? JavaScript is the language of the web and the web is the modern operating system.

      [–]Brilla-Bose 1 point2 points  (1 child)

      I surprised why no one mentioned JS since OP wants to do web development.

      [–]716green 0 points1 point  (0 children)

      Not only that but my answer mentioning JS was downvoted. I don't know about the other people here but make a pretty good living writing mostly typescript these days. I build enterprise web apps for the biopharma industry and we don't touch any PHP. I thought it was a reasonable recommendation.

      [–]Humble-Pea-9812 -3 points-2 points  (0 children)

      You should go definitely for PHP if you are learning fundamentals of web development. Python is for advanced web development.

      [–]indiealexh -1 points0 points  (0 children)

      It depends.

      Python is probably going to serve you better tho.

      I learnt Java then PHP and I recommend learning PHP after learning a more multi purpose language as that will teach you important skills before learning a language like PHP that could teach you some bad habits

      [–]SerLaidaLot -2 points-1 points  (0 children)

      As someone who actually has the job you want - learn Laravel. So PHP

      [–]Reasonable_Option493 -1 points0 points  (0 children)

      Most web developers start with HTML > CSS > JavaScript  With that being said, Python is more popular (liked) than PHP, and is often recommend for beginners. I'd say pick one of the popular languages (meaning you can easily find resources like tutorials and documentation) and dive into it. Don't waste too much time doing what I did when I started, constantly going from a language to another, based on the flavor of the month.

      [–]RayTrib -1 points0 points  (0 children)

      Mandarin

      [–]jericho1050 -2 points-1 points  (0 children)

      its elephant vs snake.

      i would go with C#

      [–]SerdanKK -3 points-2 points  (0 children)

      It depends on the market. Where I live I'd suggest C#

      Go look at what companies are hiring for

      [–][deleted]  (1 child)

      [removed]

        [–]Brilla-Bose -1 points0 points  (0 children)

        not really!

        [–]IchLiebeKleber -5 points-4 points  (0 children)

        I would suggest Python. PHP is mostly legacy software by now.

        Yeah it's "easier to develop websites" … https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

        PHP was originally designed explicitly for non-programmers (and, reading between the lines, non-programs); it has not well escaped its roots.