Slashdot Mirror


PHP At 20: From Pet Project To Powerhouse

snydeq writes: Ben Ramsey provides a look at the rise of PHP, the one-time 'silly little project' that has transformed into a Web powerhouse, thanks to flexibility, pragmatism, and a vibrant community of Web devs. "Those early days speak volumes about PHP's impact on Web development. Back then, our options were limited when it came to server-side processing for Web apps. PHP stepped in to fill our need for a tool that would enable us to do dynamic things on the Web. That practical flexibility captured our imaginations, and PHP has since grown up with the Web. Now powering more than 80 percent of the Web, PHP has matured into a scripting language that is especially suited to solve the Web problem. Its unique pedigree tells a story of pragmatism over theory and problem solving over purity."

187 of 281 comments (clear)

  1. Cue non-programmers linking "A fractal of bad desi by carlhaagen · · Score: 1

    Go on, we know you want to.

  2. PHP is great by binarylarry · · Score: 5, Insightful

    The great thing about PHP is that it's the one language that native, Java, .NET, python and ruby guys can all make fun of together.

    Here's to another 20 years (or maybe 19, depends)!

    --
    Mod me down, my New Earth Global Warmingist friends!
    1. Re:PHP is great by Anonymous Coward · · Score: 3, Insightful

      Programming languages are complex things. Just because you're not fit to use the tools properly doesn't mean the tools are to blame.

    2. Re:PHP is great by Anonymous Coward · · Score: 1

      I'd rather work in Node.js without promises.

      captcha: handgun

    3. Re:PHP is great by Anonymous Coward · · Score: 5, Interesting

      > can all make fun of together.

      I'm a Java dev of nearly twenty years, and I used to make fun of PHP. That was until my company added a team of PHP developers to work on prototypes. Over the past eight years, they have constantly exceeded the productivity of my Java devs by more than tenfold. Yes, the PHP code is harder to maintain long term, but it's amazing how fast you can build things that work. It is the best glue language I've ever seen. Basically it's just a thin shim between C libraries, and no one can argue with the quality and expansiveness of the C libraries available for Linux. PHP lets us use them very, very quickly in web, command line, and GUI apps. The only real weakness I've seen is that PHP-GTK is not very well maintained.

    4. Re:PHP is great by CastrTroy · · Score: 4, Informative

      PHP is a truly terrible language, with a truly terrible API. Just look at functions like implode, which can accept parameters in either order. Also (according to one commenter), imploding an array of booleans results in the "true" values being converted to 1, and the "false" values being converted to empty string. That's just a single function. Don't even get me started on mysql_escape_string vs. mysql_real_escape_string

      The only reason it's so popular is that for such a long time it was the only choice for server side languages on a shared hosting environment. Even now there aren't really any good alternatives. Shared hosts still don't allow things like Java,.Net, or Node.JS on the server side unless you are prepared to pay a premium. Many hosts don't even offer Ruby, or Python, even though they don't require a constantly running process.

      PHP started off as a toy project, and although a lot of work has been done to add functionality to make it useful, it still shows that it was lacking a lot of design considerations. Object Oriented capabilities and namespaces were tacked on later, and it really does feel tacked on, because only a very small part of the available libraries use object oriented features.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    5. Re: PHP is great by Anonymous Coward · · Score: 3, Insightful

      No it really is a pile of garbage. The fact that it continues to work at all is a testament to the commitment of the maintainers to continue tilting at that particular windmill.

      Why garbage? Here's why:

      1. Standards change all the time. What's the default value for that global? Depends upon the version. What? That global didn't exist when you wrote your code, so you can't check its current value to see if it affects you? Go fuck yourself.

      2. Libraries and APIs are added, replaces, and sundowned at will. Want to do an http redirect in the current version? Go fuck yourself!

      3. Error handling. Look it up. Or, rather, the designers need to do that and then implement something sane, and do it consistently.

      PHP is the only very popular language that is worse than Perl. At least Perl has some advantages to it that make you tolerate the shitty parts. I was about to write "the only thing that PHP has going for it is..." but everything I could come up with to finish that sentence wasn't true.

      It's utter rubbish.

    6. Re:PHP is great by Anonymous Coward · · Score: 5, Interesting

      exceeded the productivity of my Java devs by more than tenfold

      On my team of twenty-one devs, we have eleven Java guys and three PHP guys. We do fortnightly sprint planning meetings and score backend tasks as a group. The Java guys do about 50 points per sprint of work. They're very consistent and dependable, which is nice from a management point of view. For the PHP tasks, we schedule 75 points per week. The PHP guys, over the past three years we've been doing this, are doing 5.5 times as much per developer. PHP is amazing.

      The problem is that on a per-Sprint basis, the PHP guys are very inconsistent. Sometimes they'll do two to three times as many points as we planned on, and in a few sprints, they got no points. So even though they're five times more productive on average, our management wants to move everything to Java because it is easier to manage. Also, since we recently released v1, we know PHP maintenance tasks are going to be even more inconsistent wrt time to fix.

    7. Re:PHP is great by Anonymous Coward · · Score: 1

      Exactly. In your own words, it's just a single function. Hardly a valuable anecdote to bring to the table for why PHP is "truly terrible".

    8. Re: PHP is great by Anonymous Coward · · Score: 1

      If your PHP team has code that is "harder to maintain long-term" then you have at least two problems:

      1. Your prototypes aren't prototypes. They are live systems. I hope they are coded as such.

      2. Maintenance is perhaps the #1 most important quality of a non-prototype.

      If your Java team was better quality, they you could easily produce shitty, unmaintainable code at an astonishing rate, too!

    9. Re:PHP is great by ArcadeMan · · Score: 1

      Try ExpressionEngine and its fun "parsing order" from Hell.

      PHP is heaven in comparison.

    10. Re:PHP is great by Anonymous Coward · · Score: 5, Informative

      thin shim between C libraries
      That is a great point. Since the Microsoft fanbois hate Linux, they hate PHP. PHP is basically a way to call C libraries. That is why the library naming conventions in PHP are so inconsistent. It's because PHP is exposing those libraries, with all of their individual quirks, to an easy to use scripting language.

      Where I work, we converted a C-based CGI program that was developed from 1994 until 2009. At peak, I think we had nine C developers working on it. It took us only six months with three PHP developers to write a good PHP replacement that called our C libraries. Now I have two new college grads that are very productive adding features to the web site whereas before, I had expensive C programmers each with more than ten years of experience that took dozens of times longer to complete tasks. PHP has cut our development overhead by probably 80%. Now the three remaining C programmers can work on interesting projects rather than on web pages. PHP has, and this is not an exaggeration, saved my company.

    11. Re:PHP is great by UnknownSoldier · · Score: 2

      Indeed. PHP is one of the shittiest languages ever implemented.

      * https://wiki.php.net/rfc/incon...

      It tends to bring out all the language apologists who are in denial over how shite it is:

      * http://www.reddit.com/r/lolphp...

      It makes crappy Javascript look good in comparison:

      * http://strilanc.com/visualizat...

    12. Re:PHP is great by RyuuzakiTetsuya · · Score: 4, Insightful

      I'm currently developing in python after 7 years in the PHP world.

      There are a lot of PHPisms I have grown accustomed to, that I would really like in PHP. Namely, I want var_dump.

      PHP makes a lot of sense to me from the context of a kid who wrote awful raw HTML pages. I just wish we had a mode for PHP that wasn't "here's a pretend HTML page" for all sorts of backend logic. That's the only thing I want from python that isn't in PHP. WSGIServer is a boil on the ass of the python world.

      --
      Non impediti ratione cogitationus.
    13. Re: PHP is great by oobayly · · Score: 5, Funny

      mysqli_real_escape_string has been deprecated. You should be using mysqli_real_escape_string_honest_guv_we_won't_change_this_again

    14. Re: PHP is great by Anonymous Coward · · Score: 1

      It's still better than ASP.

    15. Re: PHP is great by UnknownSoldier · · Score: 1

      > JavaScript is still worse [then PHP]

      That is like arguing if cat or dog shit smells worse. :) They both stink, badly.

    16. Re:PHP is great by Anonymous Coward · · Score: 1

      That says more about how behind the Java platform is these days than about PHP...

    17. Re:PHP is great by drinkypoo · · Score: 1

      That is a great point. Since the Microsoft fanbois hate Linux, they hate PHP. PHP is basically a way to call C libraries. That is why the library naming conventions in PHP are so inconsistent. It's because PHP is exposing those libraries, with all of their individual quirks, to an easy to use scripting language.

      Is that a good idea? Maybe there should be a little more logic in between the libraries and the scripting language, for a variety of reasons including convenience and security.

      The only thing I hate about PHP is the way it cornholes your RAM.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    18. Re:PHP is great by plopez · · Score: 2

      "everything to Java because it is easier to manage"

      Sounds like they want a waterfall and not Agile.

      --
      putting the 'B' in LGBTQ+
    19. Re: PHP is great by Anonymous Coward · · Score: 1

      Sorry man, mysqli_real_escape_string_honest_guv_we_won't_change_this_again has been flagged for depreciation with no planned replacement.

    20. Re: PHP is great by omnichad · · Score: 1

      PHP is a web language that runs a script per page view and there is no state saved between page loads (other than a session variable that is stored to disk).

      Object-oriented programming is great, but it is really a lot of overhead when you're creating and destroying the objects on every page load. I'll admit I've created a few classes in PHP, but most of the work I do simply doesn't require it.

    21. Re: PHP is great by Anonymous Coward · · Score: 1

      #2 - http://php.net/manual/en/function.header.php

    22. Re:PHP is great by phantomfive · · Score: 5, Insightful

      Yes, the PHP code is harder to maintain long term,

      Do you understand that the vast majority of time spent on a software project is maintenance? If you optimize for the initial development, you are wasting your time.

      The only real weakness I've seen is that PHP-GTK is not very well maintained.

      ok, now you're just trolling.

      --
      "First they came for the slanderers and i said nothing."
    23. Re:PHP is great by Anonymous Coward · · Score: 1

      The only thing I hate about PHP is the way it cornholes your RAM.

      Hey. Better to cornhole your RAM than RAM your cornhole.

      Just sayin'

    24. Re:PHP is great by squiggleslash · · Score: 1

      Watch out, it may be 20==19, you never can tell, it is PHP after all!

      --
      You are not alone. This is not normal. None of this is normal.
    25. Re: PHP is great by benjymouse · · Score: 2

      Sorry man, mysqli_real_escape_string_honest_guv_we_won't_change_this_again has been flagged for depreciation with no planned replacement.

      It is deprecated in PHP 6.

      But PHP 6 has been deprecated, so now it's back in. Until it's not.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    26. Re: PHP is great by tepples · · Score: 1

      Standards change all the time.

      Such as Python 2 to Python 3.

      Error handling. Look it up. Or, rather, the designers need to do that and then implement something sane, and do it consistently.

      "Sane" would involve dropping "warnings" in favor of exceptions. Fortunately, PHP's error handling allows your program to do this most of the way, using ErrorException:

      function exception_error_handler($severity, $message, $file, $line) {
        if (error_reporting() & $severity) {
          throw new ErrorException($message, 0, $severity, $file, $line);
        }
      }
      set_error_handler("exception_error_handler");

      My beef with PHP error handling is that certain errors are fatal in PHP that are catchable in Python, such as a syntax error in include_once or a call to an undefined function.

    27. Re:PHP is great by tepples · · Score: 1

      I'm currently developing in python after 7 years in the PHP world.

      There are a lot of PHPisms I have grown accustomed to, that I would really like in PHP. Namely, I want var_dump.

      What does it do that Python's repr or json.dump or json.dumps fails at?

    28. Re:PHP is great by Anonymous Coward · · Score: 2, Interesting

      > vast majority of time spent on a software project is maintenance?

      True, but the company needs to survive long enough to get to that point. Out of the fifteen start-ups I've worked for in Seattle since the first one in 1983, most failed before we got to the point where we started to do maintenance. Most failed because .NET and Java apps take so much time and effort to get to a minimum product. Having to do maintenance, even if it is harder, is a high quality problem. It means you've survived longer than most. That is why I recommend PHP for all new web projects. You are more likely to successfully build something that is complete enough to put in the hands of customers. With actual customers and revenue, it's much easier to get investments to fix the problems.

    29. Re: PHP is great by Keruo · · Score: 1

      Atleast ASP was replaced by ASP.Net 15 years ago

      --
      There are no atheists when recovering from tape backup.
    30. Re:PHP is great by Bogtha · · Score: 2

      the PHP code is harder to maintain long term, but it's amazing how fast you can build things that work.

      Quick doesn't have to mean dirty. You can be extremely productive without creating unmaintainable crap in an ugly, badly-designed language. It's not a trade-off, you can have a better language and better productivity at the same time.

      --
      Bogtha Bogtha Bogtha
    31. Re:PHP is great by phantomfive · · Score: 1

      Most failed because .NET and Java apps take so much time and effort to get to a minimum product.

      If that's your problem, it's lousy programmers not lousy platforms.

      Like, if it takes you much longer to get a web page up in ASP than in PHP, something is wrong with you. The effort of setting up the framework is not very heavy.

      --
      "First they came for the slanderers and i said nothing."
    32. Re:PHP is great by Bogtha · · Score: 2

      There are a lot of PHPisms I have grown accustomed to, that I would really like in [Python]. Namely, I want var_dump.

      You can do far better than that. If you use a tool like the Flask debug toolbar, you can jump into an interactive debug session, running on the server, right from your browser.

      --
      Bogtha Bogtha Bogtha
    33. Re: PHP is great by Anonymous Coward · · Score: 1

      Try using it. It's an alias to another function that requires an optional library that ... doesn't implement the function.

      Trust me, I've had to upgrade an app through all this shit and I've had it. I'm leaving PHP and I'm happy to do it.

      I would encourage others to do so if it's feasible. It's just a really awful language, ecosystem, (programmer) experience.

      I'm not complaining. I'm explaining why I've had it with PHP and why I'm moving on. The grass is actually greener on the other side of any street you care to cross, here. Basically, anything else is an improvement.

      The OP was essentially about the "state of PHP 20 years later." My perspective is that it's a cesspool and it's time for everyone who can feasibly move on to do so.

      Don't get all butt hurt if PHP is your favorite language.

    34. Re: PHP is great by zieroh · · Score: 5, Insightful

      No it really is a pile of garbage.

      The very best programmers that I've encountered in my long career were the ones that could make the code sing (figuratively speaking) regardless of the environment. Any language, any OS, any hardware -- none of these things ultimately matter. All those things will be replaced by something better (or maybe worse) at some point in the future. Being able to put aside juvenile biases and petty preferences is a hallmark of the truly great programmer.

      The very worst programmers that I've encountered were the ones that bitched and whined endlessly about minute details, or those who let their pure philosophical ideals get in the way of the task at hand. They adopt stupid star-belly-sneetches attitudes for the sake of appearing smart among their peers, slagging that which they do not approve of.

      Guess which one you are.

      --
      People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
    35. Re:PHP is great by amicusNYCL · · Score: 1

      Yes, the PHP code is harder to maintain long term, but it's amazing how fast you can build things that work.

      Don't worry, we have things like Zend Framework now. Your Java guys will catch up in no time. Or, I guess that should be the other way around. Either way, get your PHP guys on that and they'll spend a day to get a basic application online. If there's a simple bug, expect 3 hours of debugging time.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    36. Re:PHP is great by amicusNYCL · · Score: 2

      Don't even get me started on mysql_escape_string [php.net] vs. mysql_real_escape_string [php.net]

      If you see anyone using the mysql extension then they deserve to receive as much shit as you can give them. It was outdated in 2004. People should be using PDO these days.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    37. Re: PHP is great by zenbi · · Score: 5, Informative

      Try using it. It's an alias to another function that requires an optional library that ... doesn't implement the function.

      What? HTTP redirects with the header() function have been simple and consistent the entire lifetime of the language. The function is not an alias and does not require an optional library as you claim. I especially like that it exposes the underlying HTTP headers of the protocol instead of wrapping the redirect into some type of hidden Response.Redirect() type function. This "lower level" makes understanding and debugging redirect problems much more obvious.

    38. Re: PHP is great by Anne+Thwacks · · Score: 2

      We use php_fake_mysql_escape_string_updated_again(). It doesn't actually work, but we use it anyway, because it was written in Perl.

      --
      Sent from my ASR33 using ASCII
    39. Re: PHP is great by Pjerky · · Score: 2

      So what you are saying is that you are a shit programmer and don't know squat about PHP. First of all, what the HELL are you doing using global variables? Can you say n00b? As for the libraries that are added and removed there are tons of ancillary libraries that are added, abandoned, and then removed by some watchful admin. All the primary libraries such as PDO or SimpleXML or GD are all maintained and have been for awhile now. Each version of PHP hangs around and gets maintained for a long while. So unless you are just blindly up doing major version jumps on your server you won't have any problems. Everything I need to do with it seems to stick with it for long periods of time. When they do get replaced it is with something much better and sticks around for a few versions with deprecation messages before it is phased out. Progress has to come eventually. Get over it whiner. Also, have you ever heard of a programming framework? You know, like Laravel, Symfony, CakePHP, CodeIgniter? Use one of those and you have even less to worry about. The maintainers of the various frameworks and packages take care of deprecated code for you. You just use their classes and functions. Easy-peasy! As for error handling, the built-in stuff is mostly just tools to peek at what went wrong. Use one of those frameworks and you get some awesome, robust solutions that work great. Plus you can get server plugins such as New Relic, Longview, or XDebug you can find a mountain of info about any variable or state or header or whatever else you need. While not everything you may want is directly built into the language I doubt you will find that with any language. That is just part of being a programmer. And I get it, you are inherently lazy being a programmer. So be a good little programmer and write a drop-in tool you can reuse and quit whining. With the advent of the PHP-FIG standards you have the whole community coalescing around some hard learned best practices that just about everyone agrees are the way to go. Once you start using those standards you will find yourself in great company. It is awesome! You will learn to be a better programmer and will be able to more efficiently do things and use a wider range of tools.

      --
      The Mind Is Speculative and Interpretive. So speculate all you want and interpret this 00101101 01001110!
    40. Re: PHP is great by binarylarry · · Score: 1, Funny

      Please don't hold back.

      Tell us how you really feel.

      --
      Mod me down, my New Earth Global Warmingist friends!
    41. Re:PHP is great by i.r.id10t · · Score: 1

      Having written CGI programs using Visual Basic (4.0) I can say that yes, I am truly glad that PHP was created. For my mostly non-programming job I use a lot of it to automate tasks to make less work for me.

      --
      Don't blame me, I voted for Kodos
    42. Re: PHP is great by TheCycoONE · · Score: 1

      And to follow up with the obvious, but ASP.net (MVC) is among the better server side languages.

    43. Re:PHP is great by binarylarry · · Score: 1

      I'd be willing to be the most hardcore agile shops are Java.

      Java shops love stupid acronyms and buzzwords like no one else.

      --
      Mod me down, my New Earth Global Warmingist friends!
    44. Re:PHP is great by Dashiva+Dan · · Score: 1
      OOP isn't what makes a programming language.
      PHP initially was completely procedural, and was still able to 'work'.
      OOP has it's place, but it's not always the best choice.

      I assume you're also one of those people who thinks if a project isn't 'agile' (or 'waterfall', or 'scrum' or 'lean' or whatever...) then it's 'stupid' and a 'brain virus'?

      Also, could you please elaborate on how:

      PHP literally turns a programmer into an end user.

      I've wasted a few minutes trying to figure out the reasoning behind the statement, but I think you left it out...

      --
      "lt;dr" is the correct response to most of my posts.
    45. Re:PHP is great by RyuuzakiTetsuya · · Score: 1

      Thanks for the heads up on flask. :) some of my work has been with django's management CLI stuff and I don't think flask can help me there. But for everything else...

      --
      Non impediti ratione cogitationus.
    46. Re: PHP is great by Hognoxious · · Score: 1

      Play fair. It uses visible delimiters.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    47. Re:PHP is great by damaki · · Score: 2

      Points cannot be compared between teams, you know. That's like agile 101. Even if you try to standardize the scale through teams, you cannot prove that these points are the same thing.
      If you start measuring productivity with points, your developpers are going to game the system and change their scale to achieve your said productivy. Sometimes, it happens unconsciously.
      If you say "it's too expensive" then, they are going to game the system to reduce points. In either case, you lose.
      Story points are just a way to know how much team-decided stuff can be done in a week for that same team. Do not try to put more meaning into it.

      And java versus PHP means nothing. What kind of projects? Web? What frameworks? Sure, PHP has lots of pitfals, but some Java frameworks and some JDK classes have numerous too. What about functional complexity?Does JAVA means backend for you and PHP is frontend for you?
      Comparing apples and Oranges, you are down to this.

      --
      Stupidity is the root of all evil.
    48. Re: PHP is great by lars_stefan_axelsson · · Score: 1

      Any language, any OS, any hardware -- none of these things ultimately matter.

      Yes they do. I know its popular to say otherwise, but that's mostly management speak.

      What is true though is that we don't know how to quantify that difference and that there are many confounding factors, such as good people tend to flock to the good tools. And that doesn't necessarily mean good for everybody, but good for good people. (In the Haskell community that's know as the "Wow, we're floored by the quality of applicants we get when we post a Haskell job. Didn't know there were programmers like that out there..."

      That this trivially true shouldn't be hard to convince oneself of as the argument is basically "Doesn't matter if we equip our troops with the Springfield 1861 rifled musket, or the fancy shmanzy, new and expensive Mauser 1891. After all they're both rifles, and everybody knows it's the rifleman that makes the difference, not the rifle."

      Yes, the skill of the rifleman is very important. Critical even. Doesn't matter what rifle you give a bad rifleman, he'll miss as well with a cheap, crappy obsolete one, as a state of the art one. And likewise, a true virtuoso will perform feats of magic whatever you hand him. BUT, and that's a big "but", that doesn't mean that the differences in all other cases, don't matter. A good rifleman will cherish the opportunities the improvements bring, and a bad one will suck less. Sometimes much, much, less.

      (And paradoxically, good performers seem to have a preference for simpler tools, that are easier to use for everybody, not the other way around, as you might think. That's probably because good performers tend to practice, and perform, a lot more than the average Joe, and hence are more exposed to their inevitable mistakes, always working to correct them. Extra complexity, for complexities sake, is hence seldom appreciated by the consummate professional.)

      Doesn't mean that other things aren't just as, or even more, important, but don't for a minute delude yourself into thinking that the actual tools of the trade doesn't matter. The saying: "It's a poor carpenter who blames his tools", is meant to warn against poor carpenters, not condone poor tools.

      --
      Stefan Axelsson
    49. Re:PHP is great by gustygolf · · Score: 1

      Scripting language quicker to develop in than a rigid OO language known for its verbosity! News at eleven!

      (I realise some people may not like the term 'scripting language'; basically, I mean all the languages that typically don't need a separate compilation step. I love them.)

      --
      "Slow Down Cowboy! It's been 58 minutes since you last successfully posted a comment" -- slashdot, driving users away.
    50. Re:PHP is great by AmiMoJo · · Score: 1

      What about security? They are building web apps, security is very important, and things that are quickly thrown together by combining a bunch of C libraries tend not to be very secure.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    51. Re:PHP is great by dave420 · · Score: 1

      You should see how HHVM fares - it has a much lower memory footprint, and runs PHP code lighting fast. It's simply amazing.

    52. Re:PHP is great by dave420 · · Score: 1

      People realised this about 10 years ago and started writing libraries to hide this nonsense from the rest of the language. As that has been done, you can stop complaining about it, as that just serves to make you look ridiculously ill-informed and outdated, something I'm sure you did not intend.

    53. Re: PHP is great by dave420 · · Score: 2
      Absolute fucking grade-A bullshit. the header() function is defined in head.c (line 39 if you're interested), and includes the following:

      PHP_FUNCTION(header)
      {
      zend_bool rep = 1;
      sapi_header_line ctr = {0};
      size_t len;

      if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|bl", &ctr.line,
      &len, &rep, &ctr.response_code) == FAILURE)
      return;

      ctr.line_len = (uint)len;
      sapi_header_op(rep ? SAPI_HEADER_REPLACE:SAPI_HEADER_ADD, &ctr);
      }

      As you can see, it talks directly to the SAPI in order to send headers. No libraries. No dependencies. No nothing. Why should anyone take any of your criticisms seriously when you are clearly talking out of your ass?

    54. Re: PHP is great by Anonymous Coward · · Score: 2, Insightful

      Atleast ASP was replaced by ASP.Net 15 years ago

      Are you seriously trying to pretend that PHP today is the same language as PHP from fifteen years ago?

      Fifteen years ago, ASP programmers were writing crufty sites with ASP code mixed in directly with their HTML, hard-coded SQL queries, and virtually no structure to the code at all, much less any classes or objects.
      Today, ASP.Net programmers are (mostly) writing good quality code using MVC framework, with NHibernate ORM to talk to the database, all written fully OO.

      Fifteen years ago, PHP programmers were writing crufty sites with PHP code mixed in directly with their HTML, hard-coded SQL queries, and virtually no structure to the code at all, much less any classes or objects.
      Today, modern PHP programmers are (mostly) writing good quality code using Laravel/Zend/Symphony/etc framework, with Eloquent/Docrtine/etc ORM to talk to the database, all written fully OO.

      Just because they didn't add ".Net" to the end of the name doesn't mean that PHP has stood still.

    55. Re:PHP is great by gl4ss · · Score: 1

      sounds that just about anything than C for web development could have saved your company.

      like, node, ruby, java, python or ANYTHING else.

      --
      world was created 5 seconds before this post as it is.
    56. Re: PHP is great by bad-badtz-maru · · Score: 1

      Maybe it's just you, though, because there's no shortage of perfectly functional sites out there that use PHP. Personally, I'd much rather look at PHP code, with explicit subroutine arguments, than Perl with the @_ BS .
      .

    57. Re: PHP is great by bad-badtz-maru · · Score: 1

      In short, you have no idea what you are doing and you're blaming that on the language.

    58. Re:PHP is great by bad-badtz-maru · · Score: 1

      You consider string escaping, in any form, to be a good mechanism for interacting safely with the database?

    59. Re:PHP is great by RyuuzakiTetsuya · · Score: 1

      repr doesn't dig deep into objects, and json dump only works on things that are JSON serializable. So a lot of objects are out.

      var_dump gave me maybe too much info, but i'd rather dig through that than nothing at all.

      --
      Non impediti ratione cogitationus.
    60. Re:PHP is great by Bogtha · · Score: 1

      The Flask debug toolbar was based on the Django debug toolbar, so I think the same functionality is available for Django. But for CLI stuff, you're probably better off just setting a breakpoint and using pdb.

      --
      Bogtha Bogtha Bogtha
    61. Re: PHP is great by tepples · · Score: 1

      Provided that you have exec privileges. And how would this be integrated into a web application so as not to add an unreasonable time to each page load?

  3. Holy crap by DoofusOfDeath · · Score: 5, Funny

    "PHP has matured into a scripting language that is especially suited to solve the Web problem."

    This almost makes me wish Dice would go back to starting its flame-wars with stories on gender inequality.

  4. Why PHP Won by Anonymous Coward · · Score: 5, Informative

    Hello world in PHP:

    Hello world!

    No Bullshit Boilerplate (TM), no needing 5KLoC of code and configuration, no application server to babysit 24/7, no need for catalina+tomcat+jakarta+jre+struts+hibernate+Xmxwtfbbq16GB, just load one module and every single customer sharing the server can use it... No need to understand the CGI protocol, no need to understand the HTTP protocol, no need to understand HTML even.

    1. Re:Why PHP Won by Anonymous Coward · · Score: 3, Interesting

      It's because in 1996 to do this on a web page:

      <? echo "Today is " . date("Y/m/d") . "<br>"; ?>

      Was AMAZING and easily understandable.

    2. Re:Why PHP Won by Anonymous Coward · · Score: 1

      in the 90's, php's only competitor for doing what it could do was embperl.

    3. Re:Why PHP Won by phantomfive · · Score: 2

      A short "Hello World" is a neat trick, but when you write PHP, how do you avoid security vulnerabilities?

      --
      "First they came for the slanderers and i said nothing."
    4. Re:Why PHP Won by Anonymous Coward · · Score: 1

      A short "Hello World" is a neat trick, but when you write PHP, how do you avoid security vulnerabilities?

      By spending time on Slashdot arguing about it? That way, the code doesn't get written in the first place, and presto, no security vulnerabilities are created.

      Or just learn how to code reasonably well in PHP and be done with it.

      But I get that it's easier to bicker about it.

    5. Re:Why PHP Won by phantomfive · · Score: 1

      Or just learn how to code reasonably well in PHP and be done with it.

      That's not possible. Plenty of people try, but then leave security vulnerabilities all over the place.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:Why PHP Won by omnichad · · Score: 2

      I won't sugar coat this: PHP allows you to write security vulnerabilities into your code. But it doesn't require it.

      You just have to actually understand vulnerabilities and be the one working to avoid them. I wouldn't use ANY large open-source piece of software written in PHP as an example. There is a LOT of garbage out there. But it's not hard to understand SQL injection and any of the other risks.

    7. Re:Why PHP Won by phantomfive · · Score: 2

      You just have to actually understand vulnerabilities and be the one working to avoid them. I wouldn't use ANY large open-source piece of software written in PHP as an example. There is a LOT of garbage out there. But it's not hard to understand SQL injection and any of the other risks.

      If there are no large open source PHP projects that have good security, it doesn't give me confidence that I can understand PHP well enough to avoid security vulnerabilities.

      --
      "First they came for the slanderers and i said nothing."
    8. Re:Why PHP Won by Tablizer · · Score: 1

      Yeah, but THIS looks more like real work:

      writerContext rc = new writerContext(); rc.setWriterManager(this.System.io.contextManager.writer(rc.defaultsContext()));
      helloWriter hw = new helloWriter(rc);
      messageManager msg = new messageManager("Hello world!");
      hw.setMessage(msg);
      system.io.write.html(hw);
      system.io.writePendingBuffer();

      Nobody will feel like paying you big bucks unless it looks hard to do.

    9. Re:Why PHP Won by omnichad · · Score: 1

      I didn't say there are no such large projects. But Wordpress is really bad code. Or at least b2 was before it was Wordpress. phpBB is far worse. But you don't even have to understand PHP much to know what's wrong. A lot of larger projects are run by people who see nothing wrong with putting unsanitized GET variables directly into a db query.

    10. Re:Why PHP Won by Ksevio · · Score: 4, Informative

      But you wouldn't do it like that because you could just do:

      Today is <?=date("Y/m/d");?><br>

      A big part of the appeal of PHP was how it could be mixed in to HTML documents to make a mess of server side and client side code.

    11. Re:Why PHP Won by guruevi · · Score: 1

      The same way you avoid vulnerabilities in other programs - you write good code and/or become a better developer.

      I can concatenate SQL strings in pretty much any language and a language that prevents me from doing so is hopelessly overcomplicated. I don't mind a library forcing me to use safer methods but if the language prevents me from sending a custom SQL or LDAP query, it's broken.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    12. Re:Why PHP Won by gnunick · · Score: 2

      A big part of the appeal of PHP was how it could be mixed in to HTML documents to make a mess of server side and client side code.

      Very appropriate choice of words. I hope I'm never asked to make such a mess (i.e., write code in PHP or JSP), ever again. Separation of concerns is key to maintainability, and this style of development is obsolete.

      --
      I have no special gift, I am only passionately curious. --Albert Einstein
    13. Re:Why PHP Won by epine · · Score: 1

      If there are no large open source PHP projects that have good security, it doesn't give me confidence that I can understand PHP well enough to avoid security vulnerabilities.

      Last I checked, MediaWiki was still written in PHP, though Lua is gaining. Though perhaps in your world it's not a large project, just a large deployment.

      Part of gaining confidence about your security practices is being good at conjuring up exemplars of the good, the bad, and the ugly. Whatever list you file it on, MediaWiki should have been on your "what PHP can really do or not do" list.

    14. Re:Why PHP Won by phantomfive · · Score: 1
      --
      "First they came for the slanderers and i said nothing."
    15. Re:Why PHP Won by i.r.id10t · · Score: 2

      Same way you do for just about any other language - don't trust any input given. Check it for type, check it for how it was delivered (POST vs GET vs reading from file/stdin/whatever), check it for a (sane) value, deal with unexpected or missing values in a sane way, etc. When using SQL stuff use PDO or mysqli class/functions to use prepared statements.

      --
      Don't blame me, I voted for Kodos
    16. Re:Why PHP Won by omnichad · · Score: 1

      Looks to be a lot more to do with the complexity of the project and the number of people interacting with it on a deep level.

      Click a few bugs and see if any of those appear to be related to the language chosen. They really don't. If anything, it shows how little coders understand about XSS (especially with respect to an often authentication-free CMS) and that parsing user-uploaded SVG and PDF files is full of potential difficulty.

    17. Re:Why PHP Won by Tablizer · · Score: 1

      Separation of concerns is key to maintainability

      No, it's the coordination of concerns. Separation alone can make for a lot of busy work as the same info ends up mirrored in gazillion different spots. Concerns often have to overlap and intertwine for domain reasons. The real world is not strictly hierarchical. For example, adding a new database column requiring changing 30 files is ridiculous. Some "separationists" just seem to want job security by mirroring the mirrors and being paid to update 30 files for simple things.

    18. Re:Why PHP Won by gnunick · · Score: 1

      Yes, I totally agree--it was a hasty reply. I was talking specifically about the horrors of combining 'view' concerns (content--i.e, HTML) with logic (JS/PHP/ASP/JSP/JSF/UGH/WTF). Modern good practices dictate that you don't even combine CSS with HTML anymore.

      Whether you do MVC or some other variant, views should never contain more than the most minimal amount of code (e.g. some templating/looping logic). It makes internationalization a nightmare (though if you never expect your project to succeed, that's probably not a concern), and the people you have writing and laying out the content shouldn't be expected to understand (and not break) all the embedded hackery.

      That is what makes PHP and other hybrids of its ilk so awful, before we even get into debating the merits of the languages themselves.

      And as for the PHP language... well, once you require me to place a non-alphanumeric character at the start of every identifier, you've already turned me off. 100s of other languages prove that syntax parsing isn't actually that hard. I'll keep the dollars in my bank account, and out of my code. But if PHP didn't this $silly obsession with dollar signs, there would be (well, there are) plenty of other valid criticisms.

      PHP was pretty cool in the 90s. Some people obviously still find it useful, others are stuck with it (largely thanks to that whole 'rapid prototyping' angle).

      At the moment, my current favorite application architecture is Dropwizard + Backbone. Solid, scalable and EASY.

      --
      I have no special gift, I am only passionately curious. --Albert Einstein
    19. Re:Why PHP Won by cavebison · · Score: 1

      Hello world in PHP:

              Hello world!

      No Bullshit Boilerplate (TM), no needing 5KLoC of code and configuration, no application server to babysit 24/7, no need for catalina+tomcat+jakarta+jre+struts+hibernate+Xmxwtfbbq16GB, just load one module and every single customer sharing the server can use it... No need to understand the CGI protocol, no need to understand the HTTP protocol, no need to understand HTML even.

      So? You realise you've just perfectly described classic ASP, which was released in 1996, a year before PHP, which was officially released in 1997.

      Apart from that, your "hello world" example is not a PHP code file, it's a plain text file. Describing a file with no php code as an example of php is being disingenuous.

    20. Re:Why PHP Won by Tablizer · · Score: 1

      I've been kicking a draft language that avoids the annoyances of PHP and JavaScript, and has optional type-enforcement abilities. But I run it by others, and they all want different features. It gets personal.

  5. A poor workman... by helixcode123 · · Score: 5, Insightful

    ... blames his tools. Crap code an be written in any language. Good code can be written in PHP. While not my first choice of languages, I have found myself on PHP projects and been fairly comfortable using it although during moments of frustration put in comments such as "These following 10 lines could be written in the following one line of Perl...".

    --

    In a band? Use WheresTheGig for free.

    1. Re:A poor workman... by carlhaagen · · Score: 4, Insightful

      As a Perl programmer of 10 years and a PHP programmer of 15 years: this equally swings both ways.

    2. Re:A poor workman... by Gestahl · · Score: 2

      A great workman doesn't work with inferior tools, and so he has no need to blame them.

    3. Re:A poor workman... by carlos92 · · Score: 1

      A great workman doesn't work with inferior tools, and so he has no need to blame them.

      A great workman know which tools are inferior. If someone says PHP is a great language and chooses it for a new project, either he doesn't have the talent to be a good programmer or he doesn't know any other language.

    4. Re:A poor workman... by phantomfive · · Score: 1, Insightful
      Adapted from The Tao of Programming:

      The Tao gave birth to machine language. Machine language gave birth to the assembler.

      The assembler gave birth to the compiler. Now there are ten thousand languages.

      Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.

      But do not program in PHP if you can avoid it.

      --
      "First they came for the slanderers and i said nothing."
    5. Re:A poor workman... by Tablizer · · Score: 1

      "These following 10 lines could be written in the following one line of Perl...".

      We accept the coding challenge, what was the task exactly? Bring it on!

      One thing I miss from PHP is optional named parameters. There are work-arounds to emulate them, but they are clunky. C#/VB.net does them fairly well.

    6. Re:A poor workman... by vilanye · · Score: 1, Insightful

      You are misusing that saying.

      What it means it that a good craftsman knows not to use substandard tools.

      A good programmer knows not to use substandard languages like PHP.

      I love that it exists because it is an easy and accurate resume filter. PHP on it? Delete it!

    7. Re:A poor workman... by UnknownSoldier · · Score: 2, Insightful

      I'll probably be downmodded but I'm going to call horseshit on that cliche. While it may be PC to be in denial over crappy tools, the fact remains some tools (programming languages) are well designed and others are not. So yeah, um, no, I don't buy that argument that a poor craftsman blames his tools. It is the good craftsman that is able to spot the crap tools DUE to experience of having used good ones AND crap ones that they can tell what is complete shit.

      Second, just because you CAN write code in Brainfuck doesn't mean you _should_; It is _still_ a crappy language for programming. PHP is no different. It was designed (LOL! Ya, right) and implemented by someone who didn't have a fucking clue what they were doing.

      The problem with a shite language like PHP is two-fold:

      1. The language is inconsistent with too many hidden gotcha's. The == operator is broken that, seriously, you can't make have this dumb shit up. When the official docs has a page called Inconsistent Behaviours you know there is a bigger problem ... PHP was released in 1995 about 4 years after Python. Ruby was around 1995 as well. It is like PHP made every beginner Comp. Sci 101 mistake AND failed to learn from it.

      2. The quality of programmers tends to be extremely poor because they are too busying being apologists for their PHucked uP language.

      We have a name for people who like suffering: Masochists.

      Meanwhile, the rest of us are laughing our asses of at their self-induced suffer over their choice of stupid tools.

    8. Re:A poor workman... by MagickalMyst · · Score: 1

      " If someone says PHP is a great language and chooses it for a new project, either he doesn't have the talent to be a good programmer or he doesn't know any other language."

      Or PHP is simply the best tool for the job.

      --
      Political correctness is really just herd psychology pushed by insecure people who desperately seek social conformity.
    9. Re:A poor workman... by Oligonicella · · Score: 1

      To which someone added "With ten lines of commentary to describe what the line does."

    10. Re:A poor workman... by Jack9 · · Score: 1

      > A good programmer knows not to use substandard languages like PHP.

      A good programmer understands what standards to adhere to.
      Try not to be a stickler for metrics that have become religious for you, as they do not seem to be significant barriers to existing projects.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    11. Re:A poor workman... by DarkOx · · Score: 1

      In what possible situation would PHP be the best tool for new development?

      I can't think of ANY.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    12. Re:A poor workman... by vilanye · · Score: 1

      PHP is a significant barrier for existing projects.

      Look at the pile of crap that is Wordpress or any PHP CMS for that matter.

      Ask Facebook how much money and time they have spent trying to hack around PHP's many warts.

    13. Re:A poor workman... by tepples · · Score: 1

      In the situation where you're developing a new extension for an existing project, such as a new MediaWiki extension. Or in the situation where you're developing a new program to run on a shared web host that has only PHP installed and not Java, Node, or ASP.NET.

    14. Re:A poor workman... by Anonymous Coward · · Score: 1

      While I enjoy taking 10 lines of code from any other language and writing it in one line in Perl, I also think of the next programmer that has to maintain my code, so I compromise and space it out to 5 lines.

    15. Re:A poor workman... by geminidomino · · Score: 3

      When the official docs has a page called Inconsistent Behaviours [php.net] you know there is a bigger problem

      My favorite part is where whoever wrote that page actually uses MySQL's behavior to defend PHP's typing stupidity.

    16. Re:A poor workman... by kuzb · · Score: 2

      ...and yet, despite all the issues you see with PHP, they're still using a language derived from it. Even though they have more than enough manpower and money to remove it entirely if they so choose.

      --
      BeauHD. Worst editor since kdawson.
    17. Re:A poor workman... by Anonymous Coward · · Score: 1

      A poor workman blames his tools.

      Whoever coined this never had to use an exploding hammer

    18. Re:A poor workman... by Jack9 · · Score: 1

      Did PHP kill your mother? What is the metric for being horrible? Is it based on lack of adoption or is it some score or is it something you only know when you see it?

      > PHP is a significant barrier for existing projects.
      > Look at the pile of crap that is Wordpress or any PHP CMS for that matter.

      WP is confusing, unmaintainable code, except for the brave few who do. Those outliers aren't really important in the grand scheme. I have encountered many proprietary CMS systems that were maintainable and maintained for years. I implemented diff in PHP in 1999. It was incomprehensible but it was used as an internal visual tool. The language is for facilitating a functional program and later for other programmers to understand and change. In this way, the projects of WP and my diff were horrible (they failed half their purpose). I cannot attribute your outrage to the language.

      > Ask Facebook how much money and time they have spent trying to hack around PHP's many warts.

      FB rewrote the JIT (which allowed for language changes) but it wasn't to get around the warts. They have explicitly said it was for performance reasons - http://readwrite.com/2010/02/0...

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    19. Re:A poor workman... by Dashiva+Dan · · Score: 1

      I love that it exists because it is an easy and accurate resume filter. PHP on it? Delete it!

      Time for me to add PHP to my resume so I can avoid job offers from managers who believe that having extra skills makes you worse. I'll never want to work for anyone so close minded.

      The fact that there's a lot of bad PHP developers doesn't mean PHP is a bad language, just that it's an easy to use flexible language.

      Come to think of it...... There's more people who speak bad english than good english, and english is a pretty flawed language. Perhaps you should also delete any resumes with english words in them?

      --
      "lt;dr" is the correct response to most of my posts.
    20. Re:A poor workman... by serviscope_minor · · Score: 2

      ... blames his tools.

      I wish this fuckling meme would die a thousand deaths, because it's so much bullshit. Good workmen ensure they have good tools. I have plenty of mediocre tools because I can't afford the very best ones.

      I recently had some contractors in to replace my roof. Almost everything they had was Makita or Hilti. There wasn't a single 25 quid Homebase special power drill in sight. They always used the drills costing hearly half a grand. Why?

      Because a Hilti drill is better in every single way (just ask a bank robber!). The torque is higher, the battery lasts longer, it's much, much more robust, the torque limiter is more accurate. It simply does a better job. Their drills never go whirr whirr squidge stall when putting in a screw. But that's not only because they have better rills, theyalso have special purpose impact drivers which put in screws more quick and more reliably than power drills.

      You could equip them with DIY specials (having them around was the first time I heard "a bit DIY" used as a pejorative) and they'd still be able to do the job, but they'd almost certainly lament the loss of their much better, much more efficient tools.

      Or what about the lathe at my local hackspace? It's one of the cheap Chinese imports. To be sure having it is much better than having no lathe. But it's just not as well made as a better one, so you get chatter and lack of precision. It's very hard to part off due to a less precisely made headstock. Is that cause for blame? Well it is if I need to part off.

      Or even those cheap nasty cross head screwdriver bits which mash out and destroy themselves and the screw head at the same time. That's the tool's fault since it doesn't happen if you have a nice box of DeWalts. And yes, that happening will yield the phrase "fucking crappy driver bits!" through gritted teeth.

      Bad tools are bad tools. One can still do a decent job without having the best quality tools. I do because as I said, I can't affford or justify the cost of the topend contractor stuff. And I even enjoy using them for carpentry at home because my employment doesn't depend on it and I'm not in a hurry. Hand tools are just a bit more laid back to use. Even if my gentleman's saw is a little blunt. If it takes me a couple of weekends to make a table, who cares?

      But you can bet your ass that if someone expected me to use my home toolset in a professional capacity, then yeah I would complain, because I can't be anything like as fast, precise or efficient with those tools as I could with a proper workshop full of quality power tools.

      A truly good workman knows which tools are appropriate for a job.

      --
      SJW n. One who posts facts.
    21. Re:A poor workman... by dave420 · · Score: 1

      You sound like PHP raped your daddy.

  6. s/power/out/ by Hognoxious · · Score: 4, Funny

    It's definitely a house, but I'd disagree about the power part.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  7. When does the powerhouse part start? by Just+Some+Guy · · Score: 4, Interesting

    PHP is Turing complete, so it's technically possible to write anything in PHP that you could write in another language. That seems to be about the most it's got going for it. PHP does nothing to help programmers write sane, maintainable code. It's almost impossible to develop without having a browser tab open to php.net ("The online docs are great!" "Well, they'd have to be."). There is zero consistency with things like argument order. Dangerous legacy concepts like "mysql_real_escape_string" are only recently deprecated and don't have a set removal schedule. It's a one-trick pony that's nearly useless outside its niche as a web page generation language. It's just a mess - a dangerous, unmaintainable mess.

    I won't refuse to use an app just because it's written in PHP, but I do heavily weight it when comparing alternatives. PHP is a powerhouse in much the same way as McDonald's. It may be ubiquitous, but it still sucks and you have to question the judgement of anyone who chooses it to start a new project.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:When does the powerhouse part start? by ArcadeMan · · Score: 3, Insightful

      When you need low-cost web hosting, PHP is quite often the only choice other than Perl.

      And Perl code looks like someone who vomited RegEx all over the place...

    2. Re:When does the powerhouse part start? by grasshoppa · · Score: 1

      I'm sorry, but web page generation language is "niche"?

      I don't necessarily disagree with anything else you said, but I just found that an odd statement considering the ubiquitous of the web in modern times.

      --
      Mod me down with all of your hatred and your journey towards the dark side will be complete!
    3. Re:When does the powerhouse part start? by phantomfive · · Score: 1

      PHP is a powerhouse in much the same way as McDonald's. It may be ubiquitous, but it still sucks and you have to question the judgement of anyone who chooses it to start a new project.

      Yes......to the point that you might be better off writing your own custom parser rather than using PHP. You'll be at a lower risk of security vulnerabilities, anyway.

      --
      "First they came for the slanderers and i said nothing."
    4. Re:When does the powerhouse part start? by Just+Some+Guy · · Score: 2

      Yes, it is. There are plenty of languages that can cleanly generate web pages and system and application development. Web frontends are important and popular, but hardly the end-all be-all of modern programming. PHP is losing a lot of ground to single-page frameworks like AngularJS. It never had ground for backend platform development outside a handful of visible companies: for every Facebook, there are 100 companies with Java or Python infrastructure platforms.

      I contend that PHP is good at exactly one thing: gathering data from backing stores and formatting it as HTML. That's being quickly superseded by browser JavaScript or portable device apps that fetch the same data through REST and format it themselves.

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:When does the powerhouse part start? by ADRA · · Score: 2

      Realistically speaking, you'd be truely astonished about how much code actually gets written behind the scenes that never show up in 'things you see'. It makes a big difference when determining the true scope of software development as a whole. According to Google, there's around 18 million software developers in the world. They all aren't writing front-ends to your latest social media web site.

      Its not surprising that PHP is a popular deployment platform for one painfully obvious reason: Hosting. Well, and some very well maintained popular PHP software platforms targetting said hosting environments (Ok, thats 2).

      --
      Bye!
    6. Re:When does the powerhouse part start? by Just+Some+Guy · · Score: 1

      PHP was built to be a thin wrapper to C libraries. Don't blame PHP for what is not its fault.

      It is at fault. It's the job of the wrapper to present a consistent interface to the things being wrapped. Otherwise, why even bother?

      It is trivial to build very high performance web, command line, or GUI apps with PHP

      And yet the only PHP command line utilities I've ever seen are shells for controlling PHP web apps. I've never seen a PHP GUI app so I can't speak to that.

      For being as allegedly suitable for developing those kinds of things, almost no one seems to be doing it.

      --
      Dewey, what part of this looks like authorities should be involved?
    7. Re:When does the powerhouse part start? by MagickalMyst · · Score: 1

      "PHP is quite often the only choice other than Perl."

      I agree. While I love Perl for doing certain things (usually system/OS related stuff) I found writing CGI scripts in Perl to be tedious. PHP is a godsend compared to Perl for web development.

      --
      Political correctness is really just herd psychology pushed by insecure people who desperately seek social conformity.
    8. Re:When does the powerhouse part start? by drinkypoo · · Score: 3, Interesting

      And Perl code looks like someone who vomited RegEx all over the place...

      To be fair, you don't have to write perl like that, and in theory the optimization is good enough to where you don't actually get anything out of it unless you miss line noise. People just tend to. They write technically beautiful perl, which is a sure road to making someone else cry later.

      I'm not an ubercoder so you can read my perl and I comment it so you can read it even more. So while some perl genius can do much more with perl than I can, my perl is probably more useful to future generations... unless we're going to cryogenically preserve some perl hackers

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    9. Re:When does the powerhouse part start? by irrational_design · · Score: 1

      >that fetch the same data through REST But, wouldn't you need something like PHP to hit the database and create JSON data to return to the REST call?

    10. Re:When does the powerhouse part start? by guruevi · · Score: 2

      While I don't know whether you're peddling for said hosting provider or not, you cannot get a good VPS under $50/mo. I've tried lots and lots of them, once you start using your capacity (try to demand ~500MB RAM, a CPU and 100IOPS in a process for a few minutes), performance will tank. At that point you're better off with a good shared hosting.

      It costs money to put a machine in a datacenter and you can only share said machine so much. Once you get >50VPS on a single host, you're screwed. And yes, it costs ~$1000/mo to put in a beefy system that can maintain 50 VPS's comfortably. So 1000/50 = $20/mo without any overhead or profit attached. I've seen these el-cheapo VPS servers handle 1000 systems at once and I've been on the customer end with timeouts and lost packets.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    11. Re:When does the powerhouse part start? by Bogtha · · Score: 1

      When you need low-cost web hosting, PHP is quite often the only choice other than Perl.

      You can get a full VPS that will run any language you want for 5USD/mo these days. Low-cost hosting hasn't been an argument in favour of PHP for years (assuming standard developed nation privileges of course).

      --
      Bogtha Bogtha Bogtha
    12. Re:When does the powerhouse part start? by amicusNYCL · · Score: 5, Insightful

      PHP does nothing to help programmers write sane, maintainable code.

      PHP does nothing to force programmers to write good code. It also doesn't force you to write bad code. It doesn't do anything, actually, other than waiting for you to use it however you want to. That means that the fact that you produce good or bad code is a reflection of your abilities instead of the language.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    13. Re:When does the powerhouse part start? by Dashiva+Dan · · Score: 2

      I'm sorry, but web page generation language is "niche"?

      I don't necessarily disagree with anything else you said, but I just found that an odd statement considering the ubiquitous of the web in modern times.

      Personally, I lost interest when the GP made it clear they consider PHP only good for generating web pages, and that it does nothing to help users write sane readable code (It's so so easy to write sane reliable reusable PHP that the next wet behind the ears college grad can make sense of and build upon, pretty much just don't be lazy, identify the PHP version, and use all the general programming language-agnostic skills like structuring and commenting.... Just because it doesn't force you to do something doesn't mean it doesn't allow it).

      While I agree that it can create 'web content' (and due to it's flexibility, excels at it, but also allows lazy programmers too easy access), but thinking that's all it does (and does well) is verging on moronic, even more so than calling the web 'niche'.

      But I could summarise 90% of complaints against PHP as "It gives programmers too much freedom" which, to be honest, kind of irritates me, because I'm not a child (||new programmer) who needs their freedom limited.

      I don't care how much damage PHP allows lazy programmers to do any more than I care how cars allow lazy drivers to have accidents, or medium XYZ allows artists to make shitty 'art'. I just care about what I can do with it, and how easily, and when it comes down to that, PHP sits near the top of my toolbox.

      And as for the flaws it allows, it makes selecting new developers in PHP a breeze, just look at their code, it'll quickly become apparent if they're going to be an asset or a liability.

      --
      "lt;dr" is the correct response to most of my posts.
    14. Re:When does the powerhouse part start? by Art3x · · Score: 1

      PHP is Turing complete, so it's technically possible to write anything in PHP that you could write in another language.

      Just don't do that, though.

      I think of PHP as mainly a glue language between my database and views, a templating language. Maybe as an extension to Apache.

      But yeah, if you're writing what you would call an application in PHP I can see why you might be frustrated.

    15. Re:When does the powerhouse part start? by dave420 · · Score: 1

      It's phenomenal as a scripting language, especially if your scripts need to share functionality with your website. Couple it with the HHVM binary and it's incredibly fast. Complaining about the mysql_ functions is fun, I know, but seeing as everyone uses a library to abstract their database queries, it hasn't been a problem in years and years and years.

    16. Re:When does the powerhouse part start? by dave420 · · Score: 1

      What do you think the AngularJS app talks to? Right - frequently PHP. You can contend whatever you want - you don't seem to know what you're talking about :)

    17. Re:When does the powerhouse part start? by bad-badtz-maru · · Score: 1

      It actually does a really great job at gathering data from backend stores and presenting it via web services or vice versa. Once you quit using it for HTML generation it works pretty well.

    18. Re:When does the powerhouse part start? by dave420 · · Score: 1

      You not knowing of people doing it doesn't mean it's not being done. Your knowledge of the world does not decide what is and what isn't. The only thing you seem to be condemning with any competency is your understanding of this subject.

  8. Re:Colon colon by RyuuzakiTetsuya · · Score: 1

    :: isn't namespacing. It's the scope resolution operator.

    \ is namespacing.

    --
    Non impediti ratione cogitationus.
  9. Party like it's 1995! by jtara · · Score: 4, Interesting

    I used the original, or close to it.

    In 1995, I worked for a company in San Diego (MediaShare) that did Tesco's first online store.

    MediaShare had a publishing tool called ProductBase, that put product details in a database, and you could publish to print or CD-ROM (remember those?). I proposed to my boss that we could also easily publish to HTML, and he let me explore it.

    This turned ProductBase into basically a static-site generator, and Mediashare built some sites for some of their existing clients ("the threes" - 3COM and 3M - we put the 3M Adhesives catalog and 3Com's catalog of network products online for the first time) and some new ones.

    One of the new ones was Tesco, and I built a little shopping cart with a very-close-to-1.0 PHP script running under Netscape Server CGI.

    I would have never thought that PHP would still be kicking around this many years later. That was the last time I ever used PHP.

    The author had no pretensions about PHP. It was a simple little script to help him with his personal home page, and he admitted his lack of programming expertise. Others turned it into a Frankenstein's monster.

  10. Good PHP Code is Possible by Gestahl · · Score: 1

    Just like good Perl is possible. That being said, if you are going to take the time to write correct, well-architected, maintainable, etc. system, you will spend equal amounts of time in any language or framework. PHP makes some things very easy, but that easiness is skin-deep, and it's exactly the same with Ruby on Rails. Yeah, you can rapidly prototype things and get stuff running in front of people. Scaling it, making it robust, and making it part of a whole ecosystem of mutually self-supporting tools, applications, and utilities? You know... real world software needs? That's going to take a good amount of effort and design in any mature framework.

    1. Re:Good PHP Code is Possible by Guspaz · · Score: 1

      Just like good Perl is possible.

      [citation needed]

    2. Re:Good PHP Code is Possible by preaction · · Score: 2
  11. Re:just as I am quitting the language by phantomfive · · Score: 1

    Now that MS is putting dot net everywhere, we are going to jump ship for C# and ASP Web API to create a SPA.

    You criticize closures, dependency injection, generators........and you want to use C#?

    --
    "First they came for the slanderers and i said nothing."
  12. Re:awwww by sexconker · · Score: 1

    The most popular language on the web HTML.
    The second most popular language on the web is Javascript.
    The third is XML.

  13. Re:awwww by plopez · · Score: 2

    Neither html or xml are programming languages. They do nothing until a programming language comes along.

    --
    putting the 'B' in LGBTQ+
  14. 80% is misleading by Guspaz · · Score: 3, Insightful

    PHP does not power 80% of the web, it is merely present on at least one server behind 80% of TLDs. That's not the same thing.

    1. Re:80% is misleading by Wraithlyn · · Score: 1

      That is not what their methodology or FAQ describes at all.

      They investigate actual web pages, not somehow identify unused modules sitting on the server, which seems to be what you're suggesting.

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    2. Re:80% is misleading by Bogtha · · Score: 2

      More specifically: if PHP is installed on a server, it typically advertises itself in the Host: HTTP header for every outgoing request, regardless of whether it was used to serve that request or not. Most other languages do not, even if they were used to serve that request. The tools that perform these language surveys can't adequately control for this, so it leads to a phenomenally large overestimation of the usage statistics for PHP.

      --
      Bogtha Bogtha Bogtha
    3. Re:80% is misleading by Guspaz · · Score: 2

      It's exactly as I suggest:

      We investigate technologies of websites, not of individual web pages. If we find a technology on any of the pages, it is considered to be used by the website.

      So a single PHP file on slashdot.org would label it as "powered by PHP" despite everything else on the site being in perl.

      We do not consider subdomains to be separate websites.

      forums.mysite.com might use PHP, but that doesn't mean that www.mysite.com is "powered by PHP". But their stats count it as such.

      In short, they treat PHP like a virus: *ANY* evidence of PHP on an entire TLD labels the entire TLD as "powered by PHP".

    4. Re:80% is misleading by Wraithlyn · · Score: 1

      That is not the same as merely "present on the server", which is what you originally said.

      And their methodology applies the same to all languages. If they are treating "PHP like a virus", then they treat all other languages the same too... you're acting like they're deliberately inflating stats just for PHP or something, which is ridiculous.

      Look, I agree that "PHP powers 80% of the web" is an exaggeration here. However the stats do show that PHP, as a used technology, is indeed present in 80% of (the top 10,000) websites.

      You are correct in pointing out this doesn't prove that PHP "powers" such websites. But "merely present on the server" is inaccurate too.

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
  15. "Powerhouse" by mujadaddy · · Score: 1

    You misspelled "Whorehouse" guys...

    --
    Populus vult decipi, ergo decipiatur...
    "Force shits upon Reason's back." - Poor Richard's Almanac
  16. PHP is the shitiest except... by morgauxo · · Score: 1

    PHP is the shitiest language out there except for all of the others.

    1. Re:PHP is the shitiest except... by narcc · · Score: 1

      That's really it in a nutshell.

      Despite the occasional legitimate complaint about the language, there isn't really anything better. Before someone posts "anything is better" I'd like to point out two factors that explain its ubiquity: it's laughably easy to setup (unlike, for example, Ruby) and it makes deployment pitifully simple. No one does those two essential things better than PHP.

      If you expect a language to compete in the same space, it not only needs to be at least as good as PHP where setup and deployment are concerned, but the language itself needs to be *easier* to use for both beginners and advanced users. You can bet against any competitor on this basis alone. We've seem a lot of flash-in-the-pan competitors over the last 15 years, after all. You'd think that if PHP was as horrible and unusable as the rabble here claim that someone would be able to do better!

  17. Extending an existing PHP app in other than PHP by tepples · · Score: 2

    So what? If you don't like it, don't use it.

    How would one go about writing an extension for an existing large codebase, such as phpBB, MediaWiki, or WordPress, in a language other than PHP? And it's likely that some of these codebases began years ago when shared web hosts charged extra for languages other than PHP.

    1. Re:Extending an existing PHP app in other than PHP by Anonymous Coward · · Score: 1

      If one hates PHP so much that they feel the need to bash it all the time, then why would they be using any of those in the first place? Alternatives are available. If a host charges extra for the alternative language, suck it up buttercup. If you hate PHP that much, then the extra cost should be worth it.

      Whining about PHP is like whining about eating rubber burgers from McDonalds for lunch when there's a proper restaurant right across the street.

    2. Re:Extending an existing PHP app in other than PHP by amicusNYCL · · Score: 2

      If you're writing extensions for PHP applications but you don't like PHP and don't want to use it, maybe you need to reconsider your job. That's like a Linux fanatic complaining about needing to use Microsoft products in their job as a programmer of Office add-ins. Or a vegan chef complaining about having to deal with meat at the steakhouse they opened. Or someone who is frightened of flying bitching about needing to go to work as a co-pilot tomorrow.

      If you don't like PHP, then maybe don't work a job that requires PHP.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    3. Re:Extending an existing PHP app in other than PHP by tepples · · Score: 1

      So to what non-PHP blog, forum, and wiki software should users of the major PHP blog, forum, and wiki software consider migrating?

    4. Re:Extending an existing PHP app in other than PHP by dave420 · · Score: 1

      Who the fuck cares? That's a problem for people who hate PHP for whatever reason.

    5. Re:Extending an existing PHP app in other than PHP by amicusNYCL · · Score: 1

      I second dave420's response.

      I've literally never researched blog, forum, or wiki software that does not use PHP, so I don't know the answer to your question, but it does raise a few questions of my own. There's obviously a lot of hate for PHP. If no one has created a high-quality CMS that doesn't use PHP then I would wonder why that is. Are other languages less suited for that kind of application than PHP? Are the people who write in those languages less likely to create open source products? I don't know the answers to those questions, but it does seem a little bit interesting how PHP so completely dominates that software niche. With all of the hate from people like you, I would think there would be a major alternative competitor. If there's not, I'm sure that says something about PHP, other languages, and the developers that use them, but I'm not sure what.

      If there's not a viable alternative, then maybe you should look into creating one. That attitude is actually exactly why PHP exists in the first place, and also why all of the popular applications are written in PHP. Someone saw a need, and they filled it with the choice that seemed most logical to them.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    6. Re:Extending an existing PHP app in other than PHP by Hognoxious · · Score: 1

      when shared web hosts charged extra for languages other than PHP.

      They did that? Why? It makes as much sense as the bit near the end of Blazing Saddles.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  18. Re:just as I am quitting the language by phantomfive · · Score: 1

    i don't think you read what i wrote properly. i'm complaining about those things being implemented over stuff that could have a real impact on productivity, rather than a 'me too!' race to keep up with the big boys features.

    Got it.

    as for C# the ASP.net libraries look pretty good, as is the entity framework, linq is quite cool...

    ASP.net is fine, and linq is cool, but I would stay away from Entity Framework. I've seen so much sorrow is produced by Entity Framework and Nuget.

    If you do use Entity Framework, keep a clear line of separation between the DB layer and the rest of your code (ie, don't spread entity framework objects all over the place), so it can be removed without too much pain if necessary. You should have a clear line between DB code and the rest of your code anyway, just as general practice.

    FWIW, I interviewed at Microsoft a couple years ago, and not even they were using ASP anymore, they were mainly doing stuff in Javascript (probably Angular+typescript, but I would stay away from that too lol). I still think ASP is fine, but caveat emptor.

    That's my current view on the topic. A lot of skilled people are switching to python for the backend. I have an irrational hatred of Python, but Django seems like a good option if you're being forced to use a 'proper' language. Look at CSS Zen garden for front-end ideas.

    Those are my two-cents.

    --
    "First they came for the slanderers and i said nothing."
  19. Re:awwww by sexconker · · Score: 1

    The person I was responding to did not specify "programming language".

  20. Re:awwww by sexconker · · Score: 1

    Did the person I responded to specify "programming language"? (Hint: NO)

    There is far more HTML and Javascript and XML on the web than there is English.

  21. Re:Cue non-programmers linking "A fractal of bad d by kuzb · · Score: 2

    Please define "programmer" for us.

    --
    BeauHD. Worst editor since kdawson.
  22. Re: awwww by qbzzt · · Score: 1

    JavaScript isn't just client side. If you disagree, I'll get MEAN with you ;-)

    --
    -- Support a free market in the field of government
  23. It gets things done by albacrankie · · Score: 1

    I can't say I love it, but it's usually available, and it usually works. What's the problem?

  24. Use === by tepples · · Score: 1

    The == operator is broken

    The same is true of JavaScript, which is why Douglas Crockford in JavaScript: The Good Parts recommends always using ===. PHP developers would be wise to read that to see what warts PHP shares with some other popular languages.

    1. Re:Use === by UnknownSoldier · · Score: 1

      Yup, Javascript's == operator is just as fucked up.

      * http://strilanc.com/visualizat...

      > PHP developers would be wise to read that to see what warts PHP shares with some other popular languages.

      You and I wish that but sadly that will never happen based on their past apologists. Too much ego and stupidity at stake such as having a broken ternary operator ?: as opposed to C. (WTF!?) And then you get stupid bugs like this memory leak ... *sigh*

      This post sums up the problem with the design of PHP:

      http://www.reddit.com/r/lolphp...

      The only way to "fix" PHP is to throw it in garbage can where it belongs and start over.

    2. Re:Use === by UnknownSoldier · · Score: 1

      If the PHP devs would even fix any of these listed here, it would be a improvement.

      * PHP: a fractal of bad design

    3. Re:Use === by narcc · · Score: 1

      Still beating that dead horse?

      It's both laughably outdated and wildly inaccurate (in the very few places that have any substantive content). The bulk of the post is empty rhetoric.

      Reposting it may net you a few points from the bottom 10% of unthinking zealots, but to the rest of us, it just makes you look foolish.

    4. Re:Use === by bad-badtz-maru · · Score: 1

      "Loose" equality has been around since dbase in the 80s and probably prior. Just because you're not familiar with it and it causes problems for you doesn't mean it's bad.

    5. Re:Use === by UnknownSoldier · · Score: 1

      Loose equality is crap. It enables too many run-time errors that a proper type system would have caught at compile time.

  25. Re:Cue non-programmers linking "A fractal of bad d by zieroh · · Score: 2

    Anyone using PHP is a non-programmer by definition.

    I'm a professional software engineer working on OS-level software for a heavyweight in the tech industry. I also use php in a non-work context. And I actually enjoy it

    Guess you'll have to peddle your absolutisms elsewhere.

    --
    People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
  26. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 2, Funny

    "Someone who writes PHP and LIKES IT."

  27. Create your own language. Problem solved. by Anonymous Coward · · Score: 1

    As in https://speakerdeck.com/nineties/creating-a-language-using-only-assembly-language

  28. PHP dominance? by prof_robinson · · Score: 1

    PHP doesn't dominate; it's attached to WordPress. That's it. If WordPress had chosen any other language....

  29. A terrible language...and I love it. by JustAnotherOldGuy · · Score: 1

    Yes, there are some weird/frustrating/awful things about PHP, but I love it- it's made me a ton of money as an independent site owner/operator and hasn't cost me anything.

    --
    Just cruising through this digital world at 33 1/3 rpm...
  30. Re:Cue non-programmers linking "A fractal of bad d by JustAnotherOldGuy · · Score: 1

    Gee, then I must not exist. I've been making a good living writing PHP for over a decade, perhaps you can tell me what I've actually been doing all this time?

    --
    Just cruising through this digital world at 33 1/3 rpm...
  31. Re: awwww by tshawkins · · Score: 2

    Node exists because it can, not because it should.....

  32. Re:Cue non-programmers linking "A fractal of bad d by JustAnotherOldGuy · · Score: 5, Insightful

    Actually, you're mistaken. I understand exactly what I need to do to get the results I want, and doing it in PHP earned me a nice living. Using PHP (the LAMP stack, really) has allowed me to work for myself, create businesses, earn money, and live pretty well. I have a hard time understanding what you don't like about that, unless it's based in jealousy. If you don't like PHP, don't use it. You're welcome to use whatever programming language you like without fear of me telling you why you're "wrong".

    --
    Just cruising through this digital world at 33 1/3 rpm...
  33. Exactly by JustAnotherOldGuy · · Score: 1

    Yep, PHP makes things simple, and there's an excellent selection of modules that can be loaded for more unusual requirements. When I saw all the junk that was required to use a typical RoR app, I laughed and closed the page.

    --
    Just cruising through this digital world at 33 1/3 rpm...
  34. Use === by tepples · · Score: 1

    Equality is not transitive in PHP (null equality is not consistent)

    True, PHP == is brain damaged. But is there a case where ($a === $b) && ($b === $c) && ($a !== $c)?

  35. Seems reasonable.... by Dashiva+Dan · · Score: 1

    Yep. I won't touch PHP. Ever. Any time I run across something I want to run and it says "requires PHP", I skip it. Even if there are no alternative programs/applications/projects.

    You use this decision making process for everything? i.e. If you don't like something you simply won't use it even if there are no alternatives? Interesting attitude.

    --
    "lt;dr" is the correct response to most of my posts.
  36. Re:Security bug prone by Dashiva+Dan · · Score: 1

    What language exists that doesn't allow you to write bad code, has no security vulnerabilities, and will still help solve the real world applications that, in this example, PHP is used for? Actually, with PHP being a wrapper for C, which is the cause of most of the issues, please let me know what gives programmers the same power and flexibility, while not allowing bad programming.
    With Apple's reputation, Swift might have been a contender, but apparently even Apple doesn't try to wall programmers in so tightly..... possibly because any such language that limits you that much doesn't really see much use, as it's incapable of achieving the same tasks.
    Just like chefs need to handle knives and flames (these days, also liquid nitrogen, etc) and can produce inedible meals, an expert chef can produce a tasty meal unharmed with damn near anything edible (yeah, I watch too many cooking shows).
    If you didn't allow a chef anything they could screw a meal up with, you'd not be getting much that wasn't screwed up either.

    --
    "lt;dr" is the correct response to most of my posts.
  37. Re:Cue non-programmers linking "A fractal of bad d by zieroh · · Score: 1

    You are an untrained monkey pounding on your keyboard until it sort of works, although you don't know why it does.

    And you're an anonymous coward with nothing meaningful to say.

    --
    People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
  38. Re:awwww by serviscope_minor · · Score: 1

    Well, CSS isn't a programming language either.

    But combine HTML and CSS and you have a beautiful little Turing Tarpit in which to write your universal computations.

    --
    SJW n. One who posts facts.
  39. You're wrong. by Qbertino · · Score: 1

    Why garbage? Here's why:

    1. Standards change all the time. What's the default value for that global? Depends upon the version. What? That global didn't exist when you wrote your code, so you can't check its current value to see if it affects you? Go fuck yourself.

    No one cares. Nobody uses global anything since 4.x.


    2. Libraries and APIs are added, replaces, and sundowned at will. Want to do an http redirect in the current version? Go fuck yourself!

    No one cares. I can find all changes with 20 seconds on php.net, one of the best PL documentations every. The differences and deprecations and changes are listed per version. And they're a good laugh during a boring coding and debugging day. Especially those parameters and function names. :-)

    3. Error handling. Look it up. Or, rather, the designers need to do that and then implement something sane, and do it consistently.

    Yeah, right. Like you - or anybody else - uses error handling consitently, no matter the PL. *I* only use it when I don't know what to expect from the adjacent API. And then I usually leave the catch loop empty, except for some printed output or something.

    --
    We suffer more in our imagination than in reality. - Seneca
  40. Re:Colon colon by dave420 · · Score: 1

    Don't bring facts to a PHP-hatenanny!

  41. I don't love PHP by juanfgs · · Score: 1

    I've been working for more than 9 years with PHP and pretty much have seen it all. From cheap quality boilerplate code hell, to really well designed code.

    The main problem with PHP is that it's lack of features sometimes forced you into using bad practices. See for example the lack of namespaces/packages way over the time every other language had an implementation for that. This is solved for now, but there is a lot of legacy code that is still out there and making other programmers pull their hair.

    Nowadays PHP has evolved, and frameworks have started using the new features in an elegant and powerful way. Some of the criticisms to PHP are still valid, other don't apply anymore. I for one think that PHP has get enough good features to ditch the "you're bound to write shitty code if you use PHP" motto. There are better languages, yes! I use them and I like them, but that's not a good reason for believing that using x language makes you a shitty developer and using y language makes you a good developer. Still... some languages might make it harder to write good code, and that's why you have to be wary and consider options.

      I don't love PHP, I won't marry PHP (that's why I'm currently learning other languages to expand my career or simply having fun) but I wouldn't marry any other language either. I love programming and I see each language as a tool which might or not be useful, I'll keep learning, but I won't trash what I know because bashing it becomes trending topic among IT freshman.

  42. Re:awwww by plopez · · Score: 1

    This entire discussion is about programming languages. You should have defined your terms.

    --
    putting the 'B' in LGBTQ+
  43. Re:Cue non-programmers linking "A fractal of bad d by hack_or_gtfo · · Score: 1

    Someone trained enough to know PHP is shit.

  44. Re:Cue non-programmers linking "A fractal of bad d by php_sucks_ass · · Score: 1

    +100000 All the butt hurt PHP losers hate it when you point out that they are untrained.

  45. Re:Cue non-programmers linking "A fractal of bad d by hack_or_gtfo · · Score: 1

    Cue the untrained PHP fanboys who think that proper CS is "snobbery".

    PHP is a blight on my craft and is argument #1 why programmers need to be certified like public engineers.

  46. What the fuck? by php_sucks_ass · · Score: 1

    Are you stupid or something?

    Oh wait, you are an uneducated PHP monkey, of course you are stupid.

    Try installing PHP from scratch and come back here with your bullshit. It is only easy because all the work was done for you. If you want to setup PHP where it is only 90% insecure instead of 100%, add about 6 days of work.

    PHP is not easy for a beginner because it is insecure by default and tons of errors get ignored. It is not easy for a professional because it is so damn hard to not fuck something up. PHP is the only language that makes doing the wrong thing easy and encouraged and doing the right thing difficult.

    Ask any Facebook programmer what they think of PHP. They will all say it is utter dogshit.

    As for Ruby it is trivially easy to set up and set up in a correct and secure manner.

    I can go from blank VM with only the base OS installed to a fully installed and configured Rails app in 20 minutes, without anything but bash.

    wget ruby_url/

    tar -zxf ruby.version.tar.gz

    cd ruby ./configure

    make && make install

    gem update --system

    gem install bundler

    gem install passenger

    passenger-install-nginx-module

    cd to location of rails app

    hg clone rails_app

    cd rails_app

    bundle install

    rake db:migrate

    rake db:seed #if db needs some default entries

    rake assets:precompile

    #paste in a few lines in nginx.conf

    start nginx

    That is 20 minutes in a slow instance. That all can be easily scripted

    To update the rails app

    hg pull

    hg update

    #precompile assets and run bundler if needed

    passenger-config restart-app

    or you can automate that will capistrano which makes it cap deploy It is even easier on Heroku.

    Fucking PHP cretins need to die in a fire and stop making the internet such a dangerous place.

    You losers are a blight on my craft. Programming is a professional endeavor. If you aren't intelligent enough to get properly educated, get the fuck out.

    Only PHP retards would read PHP for fucking numbskills, copy/paste some insecure code and call themselves professionals.

    You jackasses are the reason we need a professional society with a required certification needed to produce public-facing code. Like real engineers.

    1. Re:What the fuck? by narcc · · Score: 1

      Try to remember that we're not talking about languages at this point, after all, but those things that go in to using the language in some practical application. It doesn't matter if you think a language is horrible or fantastic.

      Try installing PHP from scratch and come back here with your bullshit.

      The first time I did that was 15 or so years ago. I remember it being completely painless, even though we had to build from source. Today, it's even easier. Other tools need to step-up their game to compete.

      Are you claiming that PHP is difficult to setup? If so, I have to question your defense of RoR.

      RoR is notorious for its unnecessarily complicated installation. Even the simple process you outline for setting up RoR is far more complicated that other competing tools. This is reality.

      Moving on, deployment in RoR is still just as painful as the installation. There are countless third-party tools to help mitigate the issue, naturally, though none that simplify the process as well as PHP. Years ago, when RoR was the hot new technology, I predicted that these two problems would prevent wide-spread adoption. I was right, and RoR is now just another also-ran. (You could claim that there were other factors, like several high-profile failures and a toxic community, but I suspect it's simply these far more mundane issues.)

      If you really want to see the end of PHP, work to produce something that's at least as good as PHP in terms of setup and deployment. Focusing on the language alone is foolish. If you want to see RoR return from the dustbin of history, work with the community to solve those problems. Pretending they don't exist won't help.

  47. open_basedir and friends by tepples · · Score: 1

    when shared web hosts charged extra for languages other than PHP.

    They did that? Why?

    I assume it must have had something to do with PHP's "safe mode", which enforced additional application-level sandboxing on top of what the UNIX permission model already enforced, restricting access to exec and to even world-readable files owned by another user. PHP has since abandoned safe mode but still retains open_basedir, which doesn't let a user open files outside a whitelist of directories. Other languages tend not to ship with analogous measures. Python, for instance, tried Bastion but abandoned it.

  48. Re:Cue non-programmers linking "A fractal of bad d by kuzb · · Score: 1

    OK, so you don't know what a programmer is. Got it.

    --
    BeauHD. Worst editor since kdawson.