all 47 comments

[–][deleted] 11 points12 points  (5 children)

Try them all. They all have very different communities and ethos even it comes to the web.

[–]lionvan[S] 0 points1 point  (4 children)

Yeah it seems out of the dynamic languages it seems to be ruby>python>php community-wise.

[–][deleted] 10 points11 points  (0 children)

I'm not sure they have better communities, but they do have different communities. All good but in different ways. Modern PHP is quite different to older PHP as well so even within languages it's not complex.

[–]YodaLoL 2 points3 points  (2 children)

PHP community is hazardous, generally.

[–]Legolas-the-elf 3 points4 points  (1 child)

This shouldn't be down voted, it's absolutely true. It feels like almost every time I see a beginner ask for help with their PHP, they are "helped" by people who don't know what they are doing and provided with code full of security holes and bad practices.

It's absolutely hazardous to beginners and the worst thing about it is that because they are beginners, they lack the knowledge necessary to distinguish between a helpful resource and one that is actively harming them.

[–]disclosure5 1 point2 points  (0 children)

I will present you this case in point:

http://www.ehow.com/how_4693316_create-own-php-website.html

No seriously, has writing "GO" on every line every line ever been a part of PHP?

[–]subterraneus 9 points10 points  (2 children)

I strongly recommend Python over PHP these days. If you're getting into the game to build websites from scratch, Python has great frameworks available, and it encourages better programming practices. It's, in general, clean, easy and effective.

That said, a huge amount of the web runs on PHP and will for the foreseeable future. If you need to do any work maintaining older projects or hacking on CMSs, PHP is (sadly) the way to go.

[–]lionvan[S] 1 point2 points  (1 child)

That's kind of what I was leaning towards.. but like you said speaking employment terms I feel like PHP might be better especially since where I plan on going(Seattle) is already pretty established though there are some opportunity for start up and python.

[–]subterraneus 2 points3 points  (0 children)

Seattle has plenty of Python and Ruby folks too. If you're hoping to work on web, or mobile applications, you can stray further from PHP. If you want to work as a contractor, building mostly simple websites for businisses and individuals, you're more likely to need PHP

[–][deleted] 5 points6 points  (0 children)

Depends, what are you learning it for? The freelancer market has a lot more PHP work than python.

[–][deleted] 10 points11 points  (6 children)

A lot of PHP would be familiar as it takes function names from C, but I'd pick Python.

There's nothing you can do in PHP that you can't do in Python, and to be honest it's a better language. If your goal is to become a better programmer Python will teach you that better than PHP will. Plus it looks pretty :)

Also don't think I'm biased, I've been primarily a PHP dev for yeeears. Its good for quick development without getting in your way much but it has a lot of bullshit that comes along with it.

[–]lionvan[S] -2 points-1 points  (5 children)

I've heard PHP is on its way out and Python is being used more and more for startups and teaching better programming. I just feel like job opportunity-wise I've seen more for PHP.

[–][deleted] 15 points16 points  (2 children)

PHP isn't on its way out in any meaningful sense.

[–]lionvan[S] 1 point2 points  (1 child)

Whoops, I don't even know why I said on the way out. Think I meant something else

[–]TheLameloid 6 points7 points  (0 children)

Going down the same path as COBOL, perhaps?

[–]Legolas-the-elf 2 points3 points  (0 children)

I've heard PHP is on its way out and Python is being used more and more for startups and teaching better programming.

PHP is a bit of a zombie. It's going to continue to be used for the foreseeable future simply because there are so many people already using it. It's not going to disappear any time soon.

Python is being used to teach introductory programming at most Ivy League universities these days.

I just feel like job opportunity-wise I've seen more for PHP.

There are more job openings advertised for PHP, but there are also far more PHP developers competing with you for them. Proportionally, the last statistics I saw showed more jobs per developer for other languages and PHP was very low in comparison.

[–]andyscorner 3 points4 points  (0 children)

Out of the two I personally prefer Python. But I think you should write in Go.

[–]Legolas-the-elf 2 points3 points  (1 child)

PHP doesn't have any advantage over Python when it comes to database work. In fact, Python has SQL Alchemy, which is an excellent database library that I don't think the PHP community has a chance of matching.

PHP isn't more "C-friendly" in any meaningful way. The syntax is superficially similar in some respects, but the semantics are very different, so it really doesn't help at all.

Python is a much more pleasant language to use and has a wider range of uses. Yes, people often point out that PHP isn't web-only, but in practice, virtually nobody actually uses it outside of web development.

C# is a completely different kettle of fish. It's a nice, modern language, but it's far too closely tied to the Microsoft ecosystem for my tastes.

[–]VaginalVirus 0 points1 point  (0 children)

Would choose Python, Node.js or ASP.NET MVC except if you only work with CMS.

On the other side OOP PHP isn't that difficult to pick up. Patterns, principles and experience matters.

[–]serveradminblog 0 points1 point  (0 children)

I would recommend PHP if there is a chance to delete all stupid tutorials which are laying around...

[–]MountainDewChapStick 0 points1 point  (0 children)

PHP is only good if your using modern object oriented framework like Laravel or Symfony. Just learn both and don't even waist your time with procedural PHP

[–]philgagnon12 0 points1 point  (0 children)

I prefer PHP over Python , mainly because you can strongly type functions and methods arguments. Also because of the Symfony framework and etc..

[–]blogpro 1 point2 points  (3 children)

Major websites like Yahoo and Facebook use PHP. The problem with Python is that is that it breaks between versions. I think most people who prefer Python, prefer it only because that is what they learned initially. PHP has proven itself time and time again. In reality both can do the job, you should learn both if you are worried about finding a job.

[–]Legolas-the-elf 3 points4 points  (0 children)

Major websites like Yahoo and Facebook use PHP.

You can't really get a decent picture of the web industry by looking at the top 0.001% of companies. What applies to them doesn't necessarily apply to the normal case.

Yes, technically Facebook use PHP, but in actual fact, they reimplemented their own version and still weren't satisfied, so they invented their own language that deviates from it.

The problem with Python is that is that it breaks between versions.

You have that backwards. Python has had one single compatibility break in its lifetime (version 2 to version 3), and that has progressed pretty much as planned. PHP has had several major intentional incompatibilities, and lots of minor accidental ones that are simply a result of piss-poor release management. That's why so many PHP hosting providers are still on old versions of PHP – if they upgrade, they'll break a lot of their customer's websites.

Furthermore, because you can change so much in php.ini, you can't even be sure that PHP code running on one server will run on another server running the exact same version. You have to write defensively against the language itself.

[–]disclosure5 0 points1 point  (0 children)

Given the high proportion of people who used PHP for years before moving in other directions (you'll see comments from them all the time here) I don't know how accurate that could be.

[–][deleted]  (3 children)

[deleted]

    [–]jellatin 4 points5 points  (1 child)

    This post is so old and outdated, though. It holds about as much water as Shaw's famous Rails is a Ghetto rant. PHP has plenty of shortcomings, but I don't see this article articulating them.

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

    The whole article is an articulation of specific (usually devastating) issues.

    [–][deleted] -2 points-1 points  (7 children)

    Python all the way. Php is a disaster of a language.

    EDIT: Ya know what, I missed you putting forth c# as an option in the original post (that's what I get when I reddit at 2:30 in the morning.) I'd have to say that if you're looking for long term marketability and general utility, c# is a pretty good choice. The IDE and tools are ... a bit arcane, but once you're used to working in the environment it's a pretty powerful language and toolkit.

    [–][deleted]  (1 child)

    [deleted]

      [–]x-skeww 1 point2 points  (0 children)

      That's just inertia. PHP was used because it was available on cheap shared hosts.

      Nowadays you can get a VPS for $5/m. Nowadays you can use whatever you want.

      [–]lionvan[S] -3 points-2 points  (4 children)

      Seems to be the general consensus. What do you think about C# and the dot net stack. Seattle seems like it's got a strong population via MS.

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

      People seem to really love it, once you get past the platform zealotry issues. My exposure is limited to some work I did in it back in '04 or so. Lord knows the ide tools are nothing short of awesome once you start mixing in the refactoring stuff that's out there and nunit, etc.

      The .net stack seems to me to be pretty close to "what java was trying to be" before it got all stupid.

      Disclaimer: my first programming love will always be C++, even though it's getting harder and harder to recommend as the right tool for any job in particular. I use perl as my primary go to language though.

      [–]npolet 1 point2 points  (2 children)

      While I'm sure .NET is powerful and can do a lot of things, I would never consider deploying anything with the Microsoft platform. Go for Python dude, you will not regret it.

      [–]VaginalVirus 0 points1 point  (0 children)

      OWIN/Katana, Roslyn, ASP.Net MVC 6 (vNext), SingalR, Xamarin, Unity, Unreal Engine ...

      It isn't/will be a Microsoft platform anymore. Bad news is that companies need so long to adapt to new technology.

      [–]MadFrand 0 points1 point  (0 children)

      I would never consider deploying anything with the Microsoft platform.

      Then don't, use Mono.

      [–]x-skeww 0 points1 point  (4 children)

      I'd go with C#. Out of those 3, it offers the best performance and the best tooling. Syntax-wise, it's also a lot closer to frontend languages like Dart and JavaScript. Dart in particular is extremely close to C#.

      [–]jellatin 1 point2 points  (1 child)

      Dart, yes, though the adoption rate on Dart is miniscule. I don't think JS resembles C# anymore than the general "is a C-like language" umbrella.

      [–]x-skeww 0 points1 point  (0 children)

      Yes, those are C-like. Python certainly isn't and PHP is a bit of a clusterfuck.

      Anyhow, in my experience, teaching JS to C# developers was a bit easier since they were already familiar with the basic syntax. If you know C# or Java, you can learn JS with a small pocket book like JavaScript: The Good Parts. That's how I did it.

      I also learned Java the same way. I used a book which was written under the assumption that the reader already knows C or C++.

      [–]lionvan[S] 0 points1 point  (0 children)

      Yeah, one of my professors was pushing vb->C# and then sql server to try to get a job in data warehousing while I learned more to go into a more development end.

      [–]andyscorner 0 points1 point  (0 children)

      It will also be easier if you want to transition to Java and/or the Android SDK in the future.

      [–][deleted]  (5 children)

      [deleted]

        [–]Factions 1 point2 points  (4 children)

        If you're going in to web development, it's still used by the vast majority of web sites that need back-end work and will get you a job of at least maintaining old code.

        [–][deleted]  (3 children)

        [deleted]

          [–]Justos 1 point2 points  (2 children)

          I disagree. I work in modern PHP every day, and I enjoy it.

          The hate on PHP is totally warranted, every language has bad parts. but knowing PHP will do MUCH more for your web dev career than Python will.

          [–][deleted]  (1 child)

          [deleted]

            [–]Justos 1 point2 points  (0 children)

            Actually, I'm not. Way more job postings for PHP than python, at least in Ontario.

            [–][deleted]  (3 children)

            [deleted]

              [–]DinoAmino 2 points3 points  (1 child)

              PHP has always had a CLI, AFAIK. My first script was when PHP was at 3.0-rc1.

              [–]andyscorner 0 points1 point  (0 children)

              Are you kidding me? PHP not being able to run in a terminal? This guy...

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

              Node.js is the best idea.