Hacker News new | past | comments | ask | show | jobs | submit login
Tell HN: I think you're downplaying the PHP community
79 points by jqueryin on Oct 14, 2016 | hide | past | favorite | 104 comments
I consider the HN community, on the whole, to be very much concerned with their professional development.

Whether it's taking classes, working on side projects, or reading the latest blogs, everyone seems genuinely interested in learning.

Based solely on vote counts alone on the frontpage for the last few days, there appears to be a very large portion of the HN community that both readily follows PHP and/or actively uses it.

What I find most interesting, however, is the comments section.

There's a large camp of developers on HN that are very outspoken regarding their abhorrence of PHP. The language has been ridiculed for well over a decade, so this is to be expected.

What's most intriguing is what you don't see in the comments: the huge number of proponents of PHP.

So where does this discrepancy between vote counts and comments stem from?

I would venture to guess the vote counts themselves stem from silent proponents. They likely don't provide counter arguments because it's simply not necessary. Nothing is gained.

Everyone here has a unified goal of working on cool problems, building amazing applications, and hoping to strike paydirt for all of our hard work.

Maybe it's time we all think about why it is we complain about language X vs. language Y and just get back to trying to make our lives and those around us better, through code.




My theory is simple: Have you ever heard the pithy saying that there is no worse non-smoker than an ex-smoker?

I think many of the loudest anti-PHP voices are ex-PHP developers. They/We naturally assume our own experience is normative, and since we didn't know X, Y, or Z back when we were coding in PHP, obviously neither does anybody else still coding in PHP.

Or, more graciously, back then PHP was the best language we had learned up to that point (better than BASIC or Perl, say), but now we use Ruby or Python or something else, so now we recognize the deficiencies in PHP. Clearly those other people, just a few steps behind us on the path, need to also learn about the deficiencies in PHP and how much better X is.

There are any number of nuanced ways for that to be expressed, but ultimately I think it's mostly tribalism, and obviously unhelpful. Sure, I used to write PHP. Built my first startup with it, sold it, and stuck with it for a few years more even after that. And sure, I don't write in PHP any more. These days it's Python or Java or Clojure for me. Because PHP sucks? No, because it doesn't suit what I'm doing these days as well. And not necessarily for reasons related to the quality of the language.


Give me a break. These are the orders in which I started learning my languages BASIC, C, assembly, (6502, z80, x86, MIPS 3000), Lisp, Perl, Java, Python, plenty of others then PHP. I really like Python, Ruby and Lua. I like the ecosystem for Python, yet want me to build a web application? I will pick PHP any day! It has it quirks and warts, but you can win big with it.


In British politics we have this concept of "The silent majority" which inevitably gets mentioned at referenda and elections. The effect was probably most prevalent in the Scottish independence referendum in 2014 where a no vote of 55% bet a yes vote of 45%.

Many many yes voters (including myself) were very surprised by this result - the internet was on fire with grass roots activism of all kinds. Glasgow had weekly rallies with thousands (sometimes tens of thousands) attending. And yet we lost.

I can't help but wonder if we're witnessing the same phenomena - a silent majority of people who feel no need to contribute to the discourse but have different opinions and values on the subjects us in the comments section are discussing.

Interesting stuff.


People generally are much more vocal about negative experiences than positive ones.

If the thing "just works", what am I going to say? "PHP is nice, it does what I need it to do". That's not interesting in any way.

If the thing doesn't work, then I usually have quite a few specific annoyances I've most likely spent considerable time trying to get around or solve completely, and I have developed strong opinions based on those experiences.


Many PHP developers don't want to talk about it simply because of how negative the comments are, many coming from people that used PHP back 10 years ago when PHP had a really big security problem with sql injection and xss. The arguments for PHP don't appear to convince anyone, so why bother?


It is same in Spain with Partido Popular (PP). Everyone seems to hate them and talk how corrupt conservative fascists they are.

And yet after every election the map of the country is blue - - color that represents PP :))



Php is objectively a bad language, and as the literature on why it is is wast like oceans, I don't feel the need to add to it. That said it's quite understandable why the language is used regardless of it's inferiority, there are some practical reasons, just like JavaScript. Thus it's understandable why people follow its news and also why it's harshly criticised. HN is a technical forum of tech entrepreneurs and computer hackers, and people discuss most often the technical aspects of things, and for Php it's more than expected that the tone be downplaying. Though I believe that should be taken as is and not be extended to community itself.


PHP is an easy language that is usable by practically anyone. And it simply make tech snobs and self-proclaimed gurus jealous :j


Php is a language that traded off every bit of sanity and security for "ease of use".

So it is easy, but have you tried building a web app in Python? You don't even need a web server. Only in recent versions Php got it's own web server. The point is, that Php is easy is mostly a myth. Other languages have as easy path to building a web applications. But they just stop short of giving up any sanity or security...

I am not sure if we should encourage people to make that tradeoff..


Come on, choose one. Either PHP is easy but insane or it is not that easy, at least compared Python? Sorry, I can't get your exact idea.


Not sure what you mean. Which part of my message is not clear to you?


The bit where you contradicted yourself in the first line.

Php is a language that traded off every bit of sanity and security for "ease of use".

There's nothing sane about unusably difficult languages.


That is not a contradiction. I am quite baffled by the way your logic works.

I saw in another comment you accuse others of using 'dirty internet tricks'. I am afraid you are either using them to the limit by yourself, or your logic is all messed up.

I will try to explain anyway. A langauge can be made difficult just for the sake of it. For example, Brainfuck. But a language can also be a bit more difficult as a result of process/methodologies that make it more secure/sane. For example the borrow checker in rust and purity in Haskell. Both of these make these languages a bit harder to use than usual.

What Php does it the opposite. Examples are things like "10"=="0x0a" being true and Php arrays being a mashup of a number of different data structures, and include/require functions that provide zero namespacing, register globals, magic_quotes etc etc....Now some of these are removed, I know, so please don't come back with that. I am mostly pointing towards one of the founding principle of the language..


It's harder to learn than its competitors due to the needless mental overhead from all its flaws.

Consistent languages are easier to learn.


Perhaps, but when it comes to PHP's niche—websites—it's easier to _get started_ than basically any other language.

Got a simple Hello World PHP site? Open your SFTP client, drag and drop, done.

Got a Hello World Python app? You have to know about WSGI adapters, process monitors, usually some sort of reverse proxying, how you're going to handle your static files, and so on.

Oh, and let's not forget that to even get to that point, you needed to use a framework of some kind, which meant wrestling with Pip and virtualenvs; you can't just 'echo "Hello World"'.

I'm picking on Python here because web dev in Python is my day job, but the story is similar for many other languages.


Why bother? You can just put your Python script into a CGI-enabled server like you do with PHP:

    #!/usr/local/bin/python2
    import cgi
    print "Content-type: text/html\n\n"
    query = cgi.FieldStorage()
    if "name" in query:
        print "Hello, %s!" % query["name"].value
    else:
        print """
        <p>Insert your name and hit Go! to get greeted!</p>
        <form action='/cgi-bin/hello-py.cgi' method='get'>
          <input type='text' name='name'/>
          <button type='submit'>Go!</button>
        </form>"""
chmod 750 and go.


Yes, this is certainly an advantage. Getting to hello world is easier.

Though that might be mitigated somewhat by things like Heroku and App Engine. My first Python code was with the latter, and I didn't even realise I was using it.


Actually, I'd say that these days that crown has been taken from PHP by Node.JS. It may not be as popular but it is definitely easier to work with than PHP, if only becausee it's 1. JavaScript and 2. Doesn't have most (all?) of the warts of PHP.

Of course it introduces a few of its own but on the whole I'd say Node is definitely easier to work with for a newcomer.


"PHP is inconsistent" is a myth cherished by haters.

Besides, real world evidence is against your theoritical musings.


Care to disagree. E.g.: array_map (callable $callback, array $array1 [, array $... ] ) and array_filter (array $array [, callable $callback [, int $flag = 0 ]]) Both are operations over an array, but the arguments aren't in the same order. I understand the why, but it is not consistent and (in my opinion) wrong, from a point of view of writing a language. This also makes it more difficult for someone to learn the language, as it was said. Let me add that Rasmus admitted he didn't know how to write programming languages, when he wrote PHP. He just wanted something that was easy and fast for web designers to learn.

That said, PHP is my go-to language when I what to get up something fast and with not much server side logic.


I've got a real good advise for you. Get yourself a good IDE with a code-completion feature. Trust me, the very next day you'll forget your grief :)


What myth? PHP has inconsistency throughout. It's one of the most commonly cited complaints about the standard library, for example, which lacks a consistent naming scheme, consistent parameter order, consistent error-handling behaviour, and so on.


You guys are so fixed on that standard library thing that I am getting scared. In a way, it's the best compliment PHP can get, means nitpicking on the function names is all they can blame PHP for. Nevertheless, for me it never was a problem - neither at a time when I used to stick with FAR commander's internal editor, nor - especially - with PHPStorm nowadays, that always put the proper syntax under my fingertips, parameter order included.

Consistent error handling is a matter of one set_error_handler() call.

Ok, undeed PHP can be called inconsistent, if one would have a fancy to. And this opinion could be even defended with numerous examples... which examples, for some reason, do not work neither for learners who prefer PHP over "more consistent languages", nor professional developers, who just get their job done.

To boil it down, I think this "inconsistency" argument works more for the internet discussion than for the real life consideration.


>do not work neither for learners who prefer PHP over "more consistent languages"

They prefer Php because they don't know any better, because they are, well, learners.

>nor professional developers, who just get their job done...

Because they were the "learners" in the earlier statement. Now they are "professionals", but still don't know any better, because they were happy from the beginning, and there is a whole community of Php apologists who will provide validation, so they didn't bothered to look elsewhere.

And someone who looked elsewhere saw a lot of unfamiliar stuff, and were turned off by it. So remained tied to php for ever...It is quite sad.


That's just your speculations that you are trying to pull here, to support your point of view that contradicts with the real world evidence (PHP is popular).

Honestly, you are claiming that all these people are dumb and lazy. I respect some snobbery but apparently not up to that point.


> You guys are so fixed on that standard library thing that I am getting scared.

It's hardly the only thing wrong with PHP, it's just one particular example.

> Nevertheless, for me it never was a problem - neither at a time when I used to stick with FAR commander's internal editor, nor - especially - with PHPStorm nowadays

How can it be especially not a problem? That would imply it was a problem and is now less of one.

In any case, yes, you can maybe learn to deal with it, but it saves time to simply work with a language which doesn't have these problems.

> Ok, undeed PHP can be called inconsistent, if one would have a fancy to. And this opinion could be even defended with numerous examples... which examples, for some reason, do not work neither for learners who prefer PHP over "more consistent languages", nor professional developers, who just get their job done.

Can you actually defend why these examples “don't work”? Learners and professionals alike have to deal with PHP's quirks.


> So where does this discrepancy between vote counts and comments stem from?

People are probably concerned about not being viewed as a good or knowledgeable developer if they admit to using PHP here, so it's probably not a fight that's worth having for most posters. People don't always give their genuine opinions when they think that their personal reputations or livelihoods are on the line.

This isn't just the case in technical or career matters, but especially when it comes to personal reputation. Just ask people how many sex partners they've had: the results will probably be skewed up or down in fairly predictable ways if people think there's a chance that they'll be judged somehow based on the answer.

Personally I think PHP is a useful (and extremely imperfect) tool that is very appropriate to solve a fairly wide range of problems. For certain problems, it's arguably the best tool. That's why it's going to be around for quite a while.


I would attribute this discrepancy to a natural extension of pg's thoughts about the blub paradox (http://www.paulgraham.com/avg.html). Most PHP developers I've talked to justify their work in PHP by saying that essentially languages are more or less the same, and that PHP is "just as good" as any other language. It's rare for me to hear someone say that PHP is substantially better than other languages. By contrast, former PHP developers who now work in other languages usually say that PHP is significantly worse than other languages. It seems natural that someone who thinks there's a significant difference would be more likely to comment about it than someone who thinks the languages are basically the same. There's more to say about the difference than there is about a lack of difference, and it's relatively hard to provide real arguments for the lack of a difference – it's usually more "there's no real evidence of a difference and this works fine for me."


The PHP people are working instead of complaining about it https://slack.engineering/taking-php-seriously-cf7a60065329#...


According to that, they're replacing PHP with Hack and HHVM.

HHVM is backwards compatible (so runs your PHP, lets you include it from Hack, etc) but it's hardly a vote of confidence in PHP, the language.


Ok, there is the other side to this coin WITHOUT replacing PHP http://engineering.dailymotion.com/php-7-deployment-at-daily...


Again, that doesn't say PHP is good, just that they think PHP7 is a better upgrade path than HHVM if you want to "scale without investing too much" (their words). A rewrite in something better wasn't an option.

It does highlight an important issue with Hack though. Once you start to migrate to Hack, moving back to "pure PHP" is a pig.


"that doesn't say PHP is good" - what are you trying to say here? That they hate PHP but keep working with it?

You see, that's a hater's logic.

Every PHP's advantage or eviddence you've given, you are trying to dismiss or even twist, calling it a disadvantage - usual tricks for the internet discussion when you aren't interested to find the truth but just to keep pressing with your opinion.

Honestly, this kind of discussion is the only problem with PHP.


It's the logic of a developer who has otherwise moved onto better things but had also had to maintain legacy PHP webapps.

I enjoy the speed boosts of HHVM or PHP7 as much as anyone else, because I benefit from it, but yeah, I still hate the language.


I pity you (no offense intended). Really. One of my own biggest fears is that it may happen that I would have to earn my living by doing things I hate.

May be your hate is entirely from the fact that you are forced to work with the tool you don't like.


I hated the language long before I stopped using it daily.

You don't need to pity me. I don't have much to do with PHP any more. All new development is either by a static generator or Django, or whatever's required... I just also maintain a PHP server for a client with a load of Wordpress installs.

That's was my point about liking stories about PHP getting better. A performance boost means a free upgrade for no extra work. I like that. Doesn't mean I like PHP.


One does not need to use Hack/HHVM, where PHP7 has types, eval and the same performance, but with much better backcompat.

There's only one other popular language, guile, which could bootstrap itself successfully recently. I don't count python 3.5 as success. Compare the numbers. Kudos to php7.


That's a fair criticism. I do a fair amount of PHP and participate in the community, so I know what you are talking about. That said, to me, the PHP professional development community seems anemic compared to the communities of other languages. I also think the PHP professional development community is smaller than that of other languages when measured as a percentage of the total professionals using the language.


> I also think the PHP professional development community is smaller than that of other languages when measured as a percentage of the total professionals using the language.

Is this really the case? I've seen estimates of around 70-80% of websites using PHP as part of their backend. Granted, many of these would be simple Wordpress sites or other blogging/shopping/content management platforms where almost no actual coding by the user is involved.


Sorry, that was unclear. What I mean is that a lower percentage of PHP-using professionals participate in professional development than, say, the percentage of Python-using professionals who do. I agree that PHP is popular.


I think 1123581321 may be referring to those that consider themselves professionals as opposed to, say, hobbyists.


> I also think the PHP professional development community is smaller than that of other languages when measured as a percentage of the total professionals using the language.

Indeed, this becomes quite apparent when it comes time to hire. The vast majority of candidates that claim competency in PHP generally fall into two camps: 1) "W3C school grads" 2) Wordpress developers. Both sets drastically increase the signal/noise ratio.


PHP is too easy to get started with and is too popular.

You can even use WYSIWYG tools to create a website, and then proceed to insert small, poorly written PHP scripts in it. Try creating a PHP gig and start looking for developers on many freelance sites - you'll get tons of people who don't even know what the hell a function is, and yet their profile claims they're experienced in PHP.

>Wordpress developers

No offense to actual Wordpress developers, but many self proclaimed Wordpress "PHP devs" I've seen are only capable of installing Wordpress with a few plugins and select skins. Maybe they know how to edit a file or two in a plugin, but that's about it. And when you ask them what language do they use, they'll obviously pick PHP, even though they couldn't code their way out of a cardboard box. This drives the average wage down, but hell, even mom & pop shops need a dynamic website these days, and Wordpress giveth.

In fact, the market really wants Wordpress developers these days. I checked out many freelance sites like freelancer.com and upwork, and there are tons of gigs available for Wordpress, Drupal, Joomla, and shopping cart setups. Hell, I'm currently looking to help out a friend by finding a dev to create a small website in PHP (or any suitable language, don't care), but the local shops only offer Wordpress and Drupal! Won't touch anything else!

Try finding a Python, Ruby, Node or Go shop who will only install scripts/CMSes and customize them. Nope, not yet! But given enough time and popularity, they'll have their fair share or developers who have no clue what the hell they're doing and will drive the average wage down. Just wait.

C/C++ and Java was like that. Since it was a part of most people's college education, everyone and their mom claimed they knew C++ or Java. It was on their resume, even though their knowledge was superficial at best. In my experience, Indian and Pakistani applicants were the worst offenders in this.


Gdamn this is a good answer


People are worried about how they are perceived by other developers. It's the same reason a lot of people loudly pooh-pooh GameMaker (citing Godot, UR4, Unity, etc. as superior) even though it's a super powerful tool that, in the right hands, can be used to rapidly prototype very complicated and versatile games.


Game Maker deserves the criticism it gets. It is easy for beginners to learn, but it traps you in its proprietary ecosystem with subpar tools.

Moreover, it is designed around bad practices in the name of simplicity. Games cannot be framerate-independent, for example.

It may be a useful prototyping tool, but I feel sorry for the people stuck using it when those prototypes turn into full-size games and they can't easily port to something better. It's better to teach people something more flexible and similar to what's used in the real world.

PHP doesn't have these problems, it's just painful.


>It may be a useful prototyping tool, but I feel sorry for the people stuck using it when those prototypes turn into full-size games and they can't easily port to something better.

On the one hand, yes. But on the other hand, I doubt the people who made Undertale are complaining.


Tobyfox has said he can't port Undertale to Nintendo consoles because he used Game Maker, despite wanting to.


"Fox had little experience with game development; he and his three brothers often used RPG Maker 2000 to make role-playing games, though few were ever completed."

Fox still has all the assets for Undertale. All he has to do is port the battle system to Unity or something and then drop in the old assets. Someone already did it for the Sans battle: https://jcw87.github.io/c2-sans-fight/

The problem is, Fox is an unexperienced developer and doesn't know how to do that. He likely wants a one-click "convert my gamemaker game to nintendo" solution not an actual porting effort which would require rewriting parts of the game in a new language/engine.


> Fox still has all the assets for Undertale. All he has to do is port the battle system to Unity or something and then drop in the old assets.

Porting the whole thing over is a lot of work, speaking as someone who has actually worked on trying to port a game away from Game Maker.

> The problem is, Fox is an unexperienced developer and doesn't know how to do that. He likely wants a one-click "convert my gamemaker game to nintendo" solution not an actual porting effort which would require rewriting parts of the game in a new language/engine.

No, he just doesn't want to waste his time on reimplementing the entire game just to run on one more platform.


I would argue that other frameworks have too steep of a learning curve for beginning game devs, and as a result, prospective game devs skip GameMaker because of the criticism and then immediately get overwhelmed by UE4, then quit trying altogether.

GameMaker is a great tool for entry level developers. It's a stepping stone. I made dozens of games with it before "graduating" to more powerful frameworks.

GameMaker does not deserve the criticism it gets. It's way more powerful than your average gamedev assumes, and creative GameMaker devs can trounce mediocre Unity devs every day of the week.


That stigma alone had kept me from trying GameMaker for a long time. Personally, I'm glad I finally pulled the trigger late last year, because it's been a tremendous boost to my output, especially prototypes and cross-platform release. Just released a mobile game, in fact :)


PHP is the Toyota Corolla of programming languages. Not many are passionate about the Corolla, but it's one of the most widely driven cars in America.

I challenge you to come up with a better car analogy.


> Not many are passionate about the Corolla

But there is also nothing particularly wrong with it. It may not be better, but it has no worse maintenance record, crash record, or accident survival rate then average car. (In software world, that would be perhaps java).

To come with better analogy - PHP is like a 15+ yo car imported from neighbour country because that's the only thing you can afford. Its popular and you'll see it all around in you area, so you may be unaware that better cars even exist. It can be used, but something breaks every 50km, the rust has eaten so much that any minor collision will get you killed, and you'll see people frantically repairing it with duck tape on every street to ever get home. But yeah, you can drive one. And have you heard that next year the tax will be lowered, so you may be able to afford 14 yo cars, life is getting so much better here.


Haha! That analogy works so well. Especially when you consider the Bondo-esque way in which higher-level language constructs have been ... well, bondo-ed on to the language.


In fact PHP7 as well as PHP fork called HackLang used in Facebook are brand new cars and the latter even produced in your own country.


Some of the painting is new, but the engine (stdlib) remains the same.


So you are blaming PHP's excellent backward compatibility. Why I am not surprised? :)


I just oppose naming it "brand new". Its largely still just as broken as it always was. Fixing one issue per release will maybe get PHP to state comparable with other languages somewhere in the next century (if they stand still in the meantime).

Also PHP could easily add sane new stdlib if it wanted to, and keep supporting the old one as long as people want to. I just don't think anyone is really interested in doing so. Most PHP users don't care much, and few large companies that fund the work are mainly focused on keeping the ship from sinking.


"keeping the ship from sinking" - surely you are a borad member for Facebook, Badoo, Dailymotion. I appreciate your first hand evidence.

Come on, if a handful inconsistent function names is all the problem with PHP to you, let me suggest you to get yourself a good IDE with a code completion feature. You'll forget that "broken stdlib" forever... of course if your aim is to get the job jone, not to slander a language you aren't working with.


>Come on, if a handful inconsistent function names is all the problem with PHP..

I don't know about OP. But it is not just that. Php is a flawed language to its roots. Just think of the community that has tolerated a feature like register_globals for, I don't know, 15 years?

What good can you expect from it?


Facebook and Wikipedia?


What? No. Just because they were written in Php does not mean that they only exists because of Php. That is more than ridiculous...

Also, that was not the question, at all.


[flagged]


We've banned this account for continuing to violate the guidelines after we asked you to stop. We're happy to unban accounts if you email hn@ycombinator.com and we believe you'll not do this any more.


That they are inconsistent is one problem. That they are functions is another (in otherwise object-oriented language). That they don't throw exceptions is one more (in a laguage that has them). IDE won't fix any of that.


You can make them throw actually.

set_error_handler("myErrorHandler"); function myErrorHandler($errno, $errstr, $errfile, $errline) { throw new Exception($errstr, $errno); }

Is all you need.

They are functions - yes. If your first language was fully OOP, then probably PHP is not your language of choice. It doesn't make it bad, though.


>set_error_handler("myErrorHandler"); function myErrorHandler($errno, $errstr, $errfile, $errline) { throw new Exception($errstr, $errno); } Is all you need.

So you think boxing all kinds of errors into one generic exception type is a solution to this shortcoming of the language?

That sure feels like a 'php' solution. I will give you that. But that ain't pretty (even as a work around), and no, it does not do the job. May be if you don't know how to work with exceptions in the first place, then it might work for you. But you might end up with a code base like this [1]

[1] http://stackoverflow.com/questions/3425835/converting-errors...


This will most likely break a lot of existing code. Even if it works, it means I'll be parsing text to figure out what exactly happened (exception not only signal "that something happended", but also "what exactly happened". In languages that use them properly that is). Third, nobody does it. Most importantly, stdlib doesn't do it. All of does make PHP bad for me.


It it will break BC, then don't use it? You guys are using every dirty trick invented for internet discussions in the last 30 years. You said it dosen't exist. When I showed the way to get it, the agrument should stop this very instant.

Instead you started nitpicking on the solution. That's dishonest. And it makes the discussion endless.

> Third, nobody does it.

This statement of yours clearly states that you have no idea of the actual PHP ecosystem. Every single major PHP framework is routinely doing it.


> It it will break BC, then don't use it?

So the choice is between insane behaviour, or breaking the code.

> Instead you started nitpicking on the solution. That's dishonest. And it makes the discussion endless.

Because the problem is unsolvable. You cannot get PHP to behave sanely unless you redo everything it does. If you fix one thing, dozens of other will fall apart.

>Every single major PHP framework is routinely doing it.

Right, I wasn't aware of this. How do you write libraries for PHP than, you choose between using what's in stdlib as it is and being used within a framework where exceptions are thrown? Support both? Ignore the problem? Or every library makes its own choice how stdlib should behave? Do the frameworks convert strerr and errno into something usable?


You do realize that they do throw Exceptions?

Welcome to PHP 7


You're right, if you enforce it via set_error_handler they do, otherwise they don't. Congratulation for PHP team, they are slowly getting on par with methodology invented in 60's. Any plans for having usable exception hierarchy like every other OOP language with exceptions so that you can actually make some use of them?


>I just don't think anyone is really interested in doing so. Most PHP users don't care much

They care. They are interested.

But backwards compatibility is a huge issue. PHP7 is much better, it's faster, it uses less resources, and yet you still have hosts running PHP 5.3, some even running 5.2! How do you combat a crowd like that? I don't want PHP to get stuck in IE6 mode, and I sure hope the community voices their valid criticism and takes action.


> They care. They are interested.

Have they really been, PHP issues would be fixed long time ago. It had 7 major releases, and people complain about exactly the same things. All the people I know who complain about it and switch to something else say the exact same things, no matter what PHP version they've left behind. Those who do care simply go somewhere else, only those who do not or have massive codebase to support stay.

> PHP7 is much better

Lets agree to disagree on that. Its not better enough to draw any of PHP opponents to it.

> you still have hosts running PHP 5.3, some even running 5.2! How do you combat a crowd like that?

You don't. Let them be. There are people using PHP 1,2,3 and 4 somewhere out there. They may never switch. Why should it hold back the rest of the world?

> I don't want PHP to get stuck in IE6 mode

The whole PHP is its own IE6.


Taking into considering that the thing you complained about (errors instead of exceptions) was fixed in PHP 7, maybe you should reevaluate your opinion about PHP not fixing things in newer versions...


>> PHP is like a 15+ yo car imported from neighbour country

What about Python ?


Car of the year from 2015. Not the shiniest toy anymore, but has everything you may need and you can get very good deal on it.


Except it doesn't have type hinting. Which is something you definitely need if you want to write good OOP software as described by the literature (Clean Code, Code Complete, Effective Java etc).


Type hinting is not exactly there yet, but its coming. You can already write:

def foo(x:int) -> int: return x+1

to get hints in your IDE (though its not enforced yet by interpreter).


PHP is a child's kick scooter. Easy to learn and you can move fast. You're halfway to the shops before the car driver has put it in reverse to back out of their driveway.


Php is like the people who voted for president bush.. Aka the majority.


I've never worked on PHP code in a truly professional context, but I've had one-off (very) small jobs where I've had to perform maintenance on some PHP. I have no doubt that the language and tooling has improved over the years, but I have no desire to ever work on any of it ever again. This is my honest opinion, and I'm not writing it to signal anything. There are dozens of viable production languages and life is short, so why work with one that you find very painful? If PHP works for you, that's fine, but people who don't like PHP are going to be vocal about it because they don't want to find themselves in a situation where they have to write it. You might not end up being forced to write PHP for pay these days, but it's not unrealistic to imagine that you might end up writing (for example) Java because you need a job even if you really don't like it. So you end up with language advocacy and trash talking and there's nothing wrong with any of that, it's just a way to let off steam and preserve your sanity.


See, the thing is: I spend much of my time trying to show people that good tools can be used to make good software. We have MUCH misinformation, and people don't even understand that you can prove a software right using theorem provers, don't know anything about type system - "C has types but they don't work" - and etc. I've heard arguments like this all the time, and that really sucks, because then you get limited by tools "you can hire people to work with".

In fact, I've been hearing for 10 years things like "what, OCaml? where do we hire someone to work on this?", "Haskell? nobody uses that", and more recently "we cannot use Rust as we don't have anyone that can possibly understand this". Saying "PHP is just another language/tool" is just throwing the towel without trying to understand anything.

What would you think if someone said "coal is just another fuel, stop trying to push electric, let me use coal and go on with life"? Well, a lot of people believe this, but let's pretent there's a consensus on this, shall we?

So, the question is: you CAN use PHP for doing web development. You can also use coal as a fuel. Not only that, but all libraries are written with this in mind, all code bases and fragments of code are focused on web development, etc. Coal is also combustible, a lot of manufactures dominate the technology, it's cheap, so.. hey, energy!

Even if the language is pure crap - as coal is as a fuel - people will only hit the crappy parts when their system is already implemented and being used by more people. "Hey, this language has a lot of issues" - "hey, this coal thing really polutes". Too late. You already have a full system implemented, you have experience with the language - or energy production technology... so you just change your workflow to accommodate this. Or you just never realize it - "whatever, no big deal" - and keep using it, as you see the advantages as more important.

There's tons of factors that contribute to the PHP popularity - the same thing with C, Perl, etc. Doesn't mean the language is good, and also doesn't mean everyone has to agree with you that "it's just another tool, let's go back to business".

So yeah, no.. I won't let you go on with PHP, sorry. I want better tools, better systems, and I want to spread knowledge. I guess we are going to agree to disagree on that.


Because arguing on the internet tends to be an exercise in frustration. If I like PHP and you don't it is unlikely that either of us will change the other's mind. So it's not really worth my time or effort to defend the language to virtual strangers. I can respect your dislike while going off to code in PHP anyway, and the world won't end. If you ask me my opinion, I'll be happy to share it, but I don't feel the urge to offer it unsolicited.


/me raises hand

I've been writing php professionally since 2000, and I like it well enough. I know it so much better than any other language that, 20 years into my career, I can't see how I'll ever learn another one well enough to compare them.


I write a lot of perl. You see a similarly depressing response there as well.

Mostly I file it under "hipsters gonna hipster" and then go back to doing something useful.


Use and hatred are not mutually exclusive. I can't be the only developer in here who has to maintain legacy webapps written in awful languages. If I see a post offering a 200× speedup on my crappy old PHP scripts, it gets an upvote.


I wish PHP had methods on primitive types, but I can live without them. PHP is not my first choice of language to develop in, but I don't think it's a bad language, and it paid my bills for quite a long time.


People that state it's such a horrible language are "follow" types. I believe some people actually do think it's a bad language, but for the most part, I would say people are just following the status quo.


I worked professionally in PHP for years, and have since worked professionally in Ruby and Haskell. I'm not following a status quo by saying that working in PHP was exceptionally painful by comparison even to Ruby (despite Ruby being quite painful by comparison to Haskell), and that I'll never work in PHP again. Maybe I'm in the minority, but I don't see any reason to think so.


It is a horrible language. In the same way that hamburgers are horrible food. But they can be damn tasty regardless.

There are plenty of resources around that demonstrate just why it's so horrible. It's inconsistent, easy to shoot yourself in the foot (mainly because of the backwards compatible stuff), some stuff is just plain broken (ISO_8601 for example), yeesh.

But for many web projects - APIs, server-driven web applications, it can be a pretty solid choice.

It's main downsides are the ugliness of the language, shaky history for core commit code quality, and poor usability for long-lived processes. In 2016, these three issues can be worked around reasonably easily (though some danger does exist especially handing a codebase to inexperienced developers).

It's upsides are quite numerous. It's gradually typed, which means it can be used dynamically, but also supports more type-driven DDD-esque work, and codebases can mature over time by progressively adding more static analysis.

The execution environments now available are fast and reasonably efficient. In practice, PHP will beat out CPython and Ruby for most request-response type applications quite handily.

The wider PHP ecosystem is pretty OK. Composer and Packagist are on par with NPM/NuGet/RubyGems, and are easily better than what's available in the Python or Go ecosystems. The quality of packages varies, but in my experience it's on par with the rest - there are some shockers, but there's a lot of solid stuff too.

Unlike Python, it doesn't suffer from massive division - older PHP code can suck, sure, but much of it has been composerified and can be used easily with a bit of Facade or Mediator in newer projects.

PHP has deployment pretty well down, too. Mod_apache is super easy for basic uses. FPM works pretty well for more advanced stuff. It's easier to manage than the likes of the JVM, or even 12-factor type "bundle into an executable and reverse proxy" apps. But you can also do that with PHP as well, if you want to.

Is it my first choice in development environment? Absolutely not. Is it a very effective tool for many applications in 2016? Absolutely. Do I pick it up over Python and Ruby if I'm looking to build a web application? Yes I do.


I've contributed to the PHP codebase for 3 years, and I think it's bad.


Hello Andrea... May I ask a question?

You're quite critical of PHP, and often claim it's bad and flawed. And yet you're a core contributor, are you not?

Well... what are your suggestions? What would you do? What's the future of the language? Should people bail or not?


> And yet you're a core contributor, are you not?

A contributor to the core, certainly. I can't say if I'm a “core” contributor.

> Well... what are your suggestions? What would you do?

I can't say with certainty what I will do, but I can point to what I've done. I've tried to fix some things which have bugged me.

> What's the future of the language?

I have no idea. There's not really a roadmap.

> Should people bail or not?

If they want to. If they'd rather use something other than PHP, and they have the choice to, then they're free to do so.


That's... oddly neutral, yet slightly discouraging.

Still... if you were building a web application today, would you consider using PHP, a "flawed language"?


I have. I write some things in PHP, because I'm familiar with it.


I have a differing opinion, and similarly have no way to back it up.


The hive mind is very strong on the internet, even on HN.


It's a wasp stronghold.


Flagged? Interesting.


Meta-discussions are often flagged because they're less likely to be intellectually interesting, but this one seems to be proceeding reasonably so we can try turning the flags off for now.


Agreed.


Not everything in the world is apples and oranges..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: