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."

281 comments

  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: 0

      OH SNAP

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

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

      captcha: handgun

    4. 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.

    5. 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.
    6. 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.

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

      Good thing you didn't get started, those escape functions are deprecated, we are all now to use mysqli_real_escape_string.

    8. 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.

    9. 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".

    10. 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!

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

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

      PHP is heaven in comparison.

    12. 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.

    13. 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...

    14. 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.
    15. Re: PHP is great by Anonymous Coward · · Score: 0

      JavaScript is still worse.

      At least PHP has support for classes and real OO, unlike JavaScript which only supports limited and generally useless prototype "OO".

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

      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.

      +1 internets to you, good sir.

    17. Re: PHP is great by Anonymous Coward · · Score: 0

      So what? If you don't like it, don't use it. It's that simple. I don't like python, so I don't use it. I also don't act like an elitist jackass by ranting about all the things I don't like about it.

    18. 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

    19. Re:PHP is great by Anonymous Coward · · Score: 0

      > PHP is a truly terrible language, with a truly terrible API.

      So is javascript by similar reasoning. At some point, you need to reevaluate what good vs bad points you are over-weighting and under-weighting. Prototype based languages are objectively bad (too obtuse, so we only ever see Lua and JS in the wild and never as large projects). Language consistency is almost completely irrelevant. After delving into any large project, you find you have to look at EVERY function for mapping parameters. It's a habit and not a requirement for productivity because patterns break down past the trivial cases.

      > Even now there aren't really any good alternatives.

      Wait. You mean ALL the alternatives that anyone can put on an AWS micro? or local VM? Stop talking about shared hosting like it's a reasonable option. Might as well be talking about people using Netscape 4.1

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

      It's still better than ASP.

    21. 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.

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

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

    23. 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.'"
    24. 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+
    25. 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.

    26. 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.

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

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

    28. Re:PHP is great by Anonymous Coward · · Score: 0

      No, PHP is to blame. I've seen good programmers start using it, and then they forget everything they know about OOP. It removes their knowledge from their brain. It's the same as watching Faux Knews. It makes you stupid. It is a brain virus. PHP literally turns a programmer into an end user.

    29. 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."
    30. 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'

    31. 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.
    32. 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*
    33. 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.

    34. Re: PHP is great by Anonymous Coward · · Score: 0

      Shame on you for not using your own regular expressions to sanitize input.

    35. 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?

    36. Re:PHP is great by Anonymous Coward · · Score: 0

      Actually, most of us use prepared statements in PHP because doing what the GP is doing is hilarious and bad.

      It speaks volumes about how much he doesn't know about programming.

    37. Re:PHP is great by Anonymous Coward · · Score: 0

      If you're having that issue PHP isn't the problem. You're just a shitty programmer in general.

    38. 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.

    39. 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.
    40. 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
    41. 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."
    42. Re:PHP is great by Anonymous Coward · · Score: 0

      There are still Ruby Devs? Creating "devops" tools that don't scale.. Ruby.. used for "devops" everywhere, never used by unicorns.

    43. 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
    44. Re: PHP is great by Anonymous Coward · · Score: 0

      And what does that have to do with PHP? That is a problem, like nearly all the complaints that people make-up about PHP's naming conventions, a problem with the MySQL C library. It would be more accurate, although still wrong, to blame C rather than blame PHP. It's the C libraries that are inconsistent on naming and parameter ordering.

    45. 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.

    46. 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.
    47. 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
    48. 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
    49. 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.

    50. Re:PHP is great by Anonymous Coward · · Score: 0

      In the last ~10 years I've built numerous sites with PHP and although the language has its flaws, I love it.

      PHP has made me hundreds of thousands of dollars over the years without costing me a cent. (I use a classic LAMP stack w/ mysql for the DB). Pretty much whatever I need, PHP can do it. It's enabled me to make a good living through my own work and creativity, and it hasn't cost me a dime.

      Yes, PHP has warts. No doubt about it.
      Yes, it has some (lots) of inconsistent function-naming. It's annoying but, eh, not a deal-breaker.
      Yes, some functions are weird, like implode(), which can take arguments in any order. I mean, WTF?
      Yes, there are some abstract features in the OO-gobledygook that aren't there or don't frambulate properly or whatever, and I don't care one bit because I don't code any Obect Oriented bullshit.*
      Yes, a lot of the things "PHP-detractors" say are absolutely 100% true. I won't argue, much of what they say is valid.

      And you know what? I don't care. :)

      PHP works for me, and I wouldn't make one extra nickel by switching to another language- any language. PHP does what I need and does it well. It's made me a boatload of money and that's the bottom line when it comes to feeding my family.

      So yes, PHP is a terrible language and I love it!

      *"OMG, you don't code in OO? How do you sleep at night?"
      Answer: "On a big pile of money made by coding stuff functionally/programatically in PHP"

    51. 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
    52. Re:PHP is great by Anonymous Coward · · Score: 0

      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.

    53. 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!
    54. 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!
    55. 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
    56. 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.

    57. 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!
    58. Re:PHP is great by Anonymous Coward · · Score: 0

      dir()

    59. 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.
    60. Re: PHP is great by Anonymous Coward · · Score: 0

      I'll just note that I've written command line information extraction PHP programs that ran in a loop for literally weeks nonstop, pulling data (legally) off the net, parsing irregular data, and using heuristics search for keywords and related content, to decide how to insert into the database. Not quite AI, but certainly well along that way. The process averaged about 10 input pages per second, 24 hours per day. Generally before they went into the corporate production environment I set them up with a controlling shell script to stop and restart once a day to avoid any issues, but that was just a precaution.

      Despite the fact that the input data for each project was completely different in structure and in the methodology for pulling and scraping the data(*), I was able to construct new projects usually in a month or less. In fact it was faster to do this than to try to configure and run any of the commercial scraping systems - we tried them, but they just weren't flexible enough when they worked at all. One of them did have a cool interface though.

      (*) Figuring out how to reverse engineer the doPostBack crap from Microsoft was a major PITA. Did you know that, quite often, the doPostback data includes multiple complete copies of the actual web page? It can be over a megabyte, and it's all crap with maybe 20 bytes of real data.

    61. Re:PHP is great by Anonymous Coward · · Score: 0

      IIUC, there's an equivalent for PHP - FirePHP, which rides on top of FireBug in Firefox. You do have to add the output statements to your PHP code. I used to have a general debug output function that provided different types of output according to a state variable.

    62. 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.
    63. Re:PHP is great by Anonymous Coward · · Score: 0

      People should be using PDO [php.net] these days.

      PDO is terrible. You give up anything the database apis are truly capable of. Using interbase/firebird? no transaction configuration (like timeouts or transaction read type), no events. Using mysql? no asynchronous queries (yes php actually supports async io with many of its apis just not as friendly as using promises or events like node.js). Stick with mysqli if you want to do anything fancy, and use parameterized queries. PDO actually is broken in that it tries to emulate parameterized queries with mysql unless you turn off emulation explicitly this is actually exploitable with the right charset. So by using PDO you give up advanced functionality and open yourself up to sql injection attacks even if you use query parameters all so you can be slightly more portable... the API is the same between databases but the SQL syntax will still be different enough you'll need to abstract the queries themselves away so you can use the right queries for the right db, may as well abstract the api calls as well then.

    64. 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."
    65. 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.
    66. 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
    67. 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.
    68. 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
    69. 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.

    70. 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.

    71. 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?

    72. 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.

    73. 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.
    74. 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 .
      .

    75. 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.

    76. 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?

    77. 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.
    78. Re: PHP is great by Anonymous Coward · · Score: 0

      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.

      Errors in included files are catchable by running another php interpreter :

      function ChkInc($file){
            return (substr(exec("php -l $file"), 0, 28) == "No syntax errors detected in");
      }

      See here : stackoverflow

    79. Re: PHP is great by Anonymous Coward · · Score: 0

      I guess you also ignore 80% of the web, because most pages are built with PHP.

      Nice attitude there. No wonder you are spinning your wheels in the same space getting nothing done.

    80. 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
    81. 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?

    82. Re: PHP is great by Anonymous Coward · · Score: 0

      Being able to put aside juvenile biases and petty preferences is a hallmark of the truly great programmer.

      You sound like a hit and run programmer. Leaves a mess for everyone else.

      You are not paying parent poster, are you? Do they work for you? They can criticize PHP all day long. It is not your place to tell them otherwise.

      What you did is called "ad hominem" -- either agree or disagree with criticisms of PHP.

      There are people who can have an actual debate, and people who just do ad hominem attacks. Guess which one you are?

      Either address the issues, say you disagree, say they are not valid criticisms.

      Jesus christ. Attitude yourself.

  3. Early Days? by Anonymous Coward · · Score: 0

    There was plenty for the early days. Maybe they weren't newbie friendly due to having to actually learn programming before coding.

  4. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0

    Sigh, ok, you insisted: https://www.youtube.com/watch?v=dQw4w9WgXcQ

  5. 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.

  6. If Worse Is Better... by Anonymous Coward · · Score: 0

    PHP is the best!

  7. awwww by Anonymous Coward · · Score: 0

    im sorry you dont like the most popular language on the web you little fucking hipster, cry us a river

    1. 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.

    2. 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+
    3. Re:awwww by Anonymous Coward · · Score: 0

      HTML is not a programming language, it's a markup language, and serves a completely different purpose.

      Javascript is a client-side scripting language, and again serves a completely different purpose.

      XML is a giant tangled clusterfuck of whatever you feel like it being at the moment, and confuses the shit out of anyone new to coding, since it's simultaneously every type of language at once, but only if you've got a framework prepared to use it as whatever.

      PHP is a server side scripting language, and if you're going to claim something is more popular in it's category, at least pick something that is in it's category, like Perl, Ruby, Python, or even Coldfusion (yeah, it's still around. Weird, eh?)

      The way your post reads, (not bothering with keeping the languages to the same category) it's not even true - the second most popular language on the web is english.

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

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

    5. 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.

    6. 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
    7. Re: awwww by tshawkins · · Score: 2

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

    8. 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.
    9. Re:awwww by plopez · · Score: 1

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

      --
      putting the 'B' in LGBTQ+
    10. Re: awwww by Anonymous Coward · · Score: 0

      The web us full of moronic, the language spoken by morons like you.

    11. Re:awwww by Anonymous Coward · · Score: 0

      im sorry you dont like the most popular language on the web you little fucking hipster, cry us a river

      equivalent: I'm sorry you don't like the diseased whore who is covered with STDs -- she is really a very sweet person.

      Observation: without fail, people who use the word "hipster" are always defending their own hipster tastes.

  8. 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 Anonymous Coward · · Score: 0

      Hello world is simple in PHP for sure, but what about more complex programs? PHP has plenty of boilerplate then.

      http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    6. 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."
    7. Re:Why PHP Won by Anonymous Coward · · Score: 0

      Yawn. You're pulling shit out of your ass.

    8. 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.

    9. 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."
    10. 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.

    11. 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.

    12. 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.

    13. 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
    14. 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
    15. 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.

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

      React.js is ready for you.

    18. 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
    19. Re:Why PHP Won by Anonymous Coward · · Score: 0

      <?php

      $today = date('Y/m/d');

      ?>
      Today is <?=$today?><br>

      OR

      <?php

      $today = date('Y/m/d');
      echo "Today is {$today}<br>";

      ?>

    20. Re: Why PHP Won by Anonymous Coward · · Score: 0

      "people who see nothing wrong with putting unsanitized GET variables directly into a db query."

      No! The saucy minxes.

    21. 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.

    22. Re:Why PHP Won by Anonymous Coward · · Score: 0

      Drupal at one time was a real security sink, but so many large companies and government agencies began using it, the number of maintainers has expanded a lot, and at least the core and major plug-in modules are considered pretty tight now. If you look at the top million highest volume websites, IIRC 16% of them are running Wordpress and only 2.3% run Drupal. But the total amount of traffic per site is the other way - Drupal sites have much higher traffic than Wordpress. IOW, Wordpress is still mostly lonely bloggers while Drupal sites are running complete corporate or agency internet systems. Drupal combines a truly vast array of tools - 18,000 modules (of which I'll guess 2/3 are actually useful and not obsolete) with support for amazingly fast construction, once you get past the vertical early learning curve of course!

      I suspect many of the less-well-used plugins have security issues, but one of the smart things that the Drupal folks have been doing is building tools that allow website builders to build amazingly complex web system without writing a lick of code or SQL. Even module builders can do most or all of their work using built-in functions that have already been designed and vetted for security.

    23. Re:Why PHP Won by Anonymous Coward · · Score: 0

      Hilarious. I used that example from the php docs page itself :)

      though I did change <?php to <? because that's how it was done back then.

      And yes, the easy mixture of fixed HTML and dynamically-generated HTML was the big draw, which I thought was implied with the example.. I should have put some tags around the php stuff I guess to make it clearer.

    24. Re:Why PHP Won by Anonymous Coward · · Score: 0

      I've just become involved with a C# project where all web service methods are taking unsanitized input and using string replacement to build queries that are passed direct to Oracle. And this API is consumed by several major US retailers and the database sitting behind it is all of their customer and transaction data.

      It's worse than anything I've seen in PHP since the "discovery" of SQL injection and this code was written in 2012.

    25. 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.

    26. 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
    27. 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.

    28. 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.

  9. 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 Anonymous Coward · · Score: 0

      .... and a good workman could carve whole pyramids with toothpicks.

    9. 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.
    10. Re:A poor workman... by Anonymous Coward · · Score: 0

      Can it? I remember trying to pass object references to functions in PHP in early 2000s, but it was not supported and it copied objects instead. Once they fixed it, most mature products that were built using PHP had to be rewritten. All that good PHP code broke and became worse-less. So.. no, it takes more than just the developer to write good code. It also takes a good programming language.

    11. Re:A poor workman... by Oligonicella · · Score: 1

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

    12. 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.
    13. 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
    14. 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.

    15. 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.

    16. 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.

    17. 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.

    18. 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.
    19. Re:A poor workman... by Anonymous Coward · · Score: 0

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

      I can't think of ANY.

      When you have plenty of trained PHP developers on staff already.

    20. 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

    21. 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.
    22. Re:A poor workman... by Anonymous Coward · · Score: 0

      and yet so many people still use Java

    23. 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.
    24. Re:A poor workman... by Anonymous Coward · · Score: 0

      To paraphrase Mark Twain, "Everyone complains about PHP, but nobody does anything about it."

    25. 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.
    26. Re:A poor workman... by Anonymous Coward · · Score: 0

      They're coming in PHP 7 I think.

    27. Re:A poor workman... by dave420 · · Score: 1

      You sound like PHP raped your daddy.

    28. Re:A poor workman... by Anonymous Coward · · Score: 0

      Amen and amen.

    29. Re: A poor workman... by Anonymous Coward · · Score: 0

      I always thought it meant tools are for efficency essentially. I believe it was colt who crafted a beautiful rifle with just a file. A good workman's quality should not be affected by poor tools.

      However there is a caveat that doing so slows them down. While impressive to make do without give them good tools, their time is more expensive anyway.

    30. Re:A poor workman... by Anonymous Coward · · Score: 0

      When there have been changes, the event is considered political chicanery.

      *change*
      They didn't do enough in changing it!
      *change*
      They didn't consult me!
      etc.

    31. Re:A poor workman... by Anonymous Coward · · Score: 0

      [A poor workman]... blames his tools.

      It sounds like a cute phrase, but I can't remember actually seeing a poor workman blaming his tools. However, I remember many occasions when poor workmen showed up with poor tools bragging they're cheaper, saying "what's the difference," monkeying around to finish a job without getting the proper tool first, or often being totally unaware that the proper tool exists.

      While good workmen do not "blame" things, they do show up with good tools, spend a lot of time talking to each other about tools, and sometimes make their own tools.

      A better phrase would be, "an amateur workman spends all his time talking about tools and no time working, and has a truck full of shiny expensive tools that have never been used."

    32. Re:A poor workman... by Anonymous Coward · · Score: 0

      > 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.

      Also, even if PHP is a bad language, that doesn't mean anyone who uses it is stupid, incompetent or ignorant.

      I've worked with a lot of different languages and platforms, and sometimes you don't get to pick. If you're starting a project from scratch, then no, don't use PHP. If someone already using PHP shoves a wad of cash in your face and says, "help us!" it's worth your while to know PHP and other languages from which you've gleaned good design principles.

  10. Colon colon by ndansmith · · Score: 0

    Obligatory complaint about PHP's namespace implementation.

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

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

      \ is namespacing.

      --
      Non impediti ratione cogitationus.
    2. Re:Colon colon by dave420 · · Score: 1

      Don't bring facts to a PHP-hatenanny!

  11. 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."
    1. Re: s/power/out/ by Anonymous Coward · · Score: 0

      I was going to say, from pet project to "seriously, we are stuck supporting THIS!?!?!?"

  12. 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 Anonymous Coward · · Score: 0, Flamebait

      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.

      I'm going to print this out and put it on my office door.

      You fucking nailed it...

      And to any devs who have no software engineering experience outside of a web stack, fuck you, you're a cunt, and you don't count. It's a philosophical issue with you morons: it's an epistemological issue that you cannot fathom.. you're so stupid you don't know how dumb you even are.

      I've worked with OS code, firmware, etc, and I quite literally hate 90% of the web dev programmers I meet. Formal methods? Verification? Decent specs? What are those?!?

      But then again, good enough is good enough, correct? Until it's not.

    5. 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?
    6. 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!
    7. 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?
    8. 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.
    9. 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.'"
    10. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      > PHP is Turing complete

      Actually it's not, which is one of the great many reasons why it's shit.

      Equality is not transitive in PHP (null equality is not consistent) and so because of the failure to adhere to this axiom, PHP is not technically Turing complete.

      Of course, it doesn't matter in practice, but I find it amusing that even the incredibly simple property to implement of Turing completeness is failed by PHP, that's how bad it is.

    11. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

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

      That's hogwash. You can get a basic VPS for anything from $2/mo to $5/mo* with more monthly bandwidth than most sites will use. Sign up, choose an image with Debian stable, and you can use anything you want, including a different httpd. Has the added bonus that you have more control and you can work directly on the site via shell, too

      If you're too scared of the command line to go that route, though, there are still options. First one I can think of offhand is NearlyFreeSpeech.net: I just checked and it has C/C++, Go, Haskell, Java, node.js, Lua, OCaml, Perl, PHP, Python, Ruby, and multiple lisp dialects as options for CGI. I'm sure that's not the only webhost that has more than just PHP and Perl available; if nothing else, most distros come with Python installed and Ruby will likely still be available because of rails.

      * lowendbox.com aggregates deals on VPSes and dedicated hosting. You can find options from all over the world at various price ranges. It's how I found the VPS I use (not naming them because I'm not posting this to advertise for anybody)

    12. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      > Of course, it doesn't matter in practice

      Because in practice, it is technically turing complete. Your example is a diminished scope that does not apply to the exercise. You get a D+

    13. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      > PHP is losing a lot of ground to single-page frameworks like AngularJS.

      Where on earth would anyone make that connection? Basketball is losing ground to camping!

    14. 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?

    15. 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
    16. 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
    17. 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
    18. 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.
    19. 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.

    20. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      With all the tools in its toolbox, PHP is also pretty good at information extraction, i.e. going the other way: heuristic parsing of incoming HTML, XML and raw text.

    21. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      After you finish the "Roll Out the Barrel" penalty!

      Cue the Raymond Scott

    22. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      Dangerous legacy concepts like "mysql_real_escape_string" are only recently deprecated and don't have a set removal schedule.

      Wrong: the mysql_xxx functions are being removed in PHP 7, scheduled for release later this year.

      Most of the other dangerous legacy stuff (register_globals and all that) was removed in 5.4.

      It's a one-trick pony that's nearly useless outside its niche as a web page generation language

      Have you any idea how much back-end web code is being written. Far *far* more than the amount of code being written for any other environment. PHP may be fairly specifically geared toward a web environment, but it's hardly a niche.

      I won't respond to the rest of your post because you haven't backed up any of your statements; you're basically just ranting.

      PHP has grown up in the last few years. There is just as much code being written in it as there ever was, but what people today are writing is largely well-structured object-oriented code; the days of a everyone hacking together a mish-mash soup of HTML with bits of insecure PHP code scattered through it are long gone. If you think that's what PHP is you clearly haven't actually used it for some time.

      I'm not saying it's perfect. Far from it; the language does indeed have a lot of historical cruft which still needs to be removed, but they have removed the worst of it already, and with the new features that have been added in recent versions it is actually a half-way decent language.

    23. 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.

    24. 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 :)

    25. 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.

    26. 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.

    27. Re: When does the powerhouse part start? by Anonymous Coward · · Score: 0

      LOL,
      And over the years of doing your elite system programming, how many exploits did you write? Exactly, programmers are not perfect, neither are people.

    28. Re:When does the powerhouse part start? by Anonymous Coward · · Score: 0

      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 never named the VPS I use, or any specific VPS provider actually, so I don't know why you think I was peddling for "said hosting provider". I did mention NearlyFreeSpeech, but they're a webhost, not a VPS, which is why I mentioned them as an alternative to using a VPS. I only did that because I already knew offhand that they provided alternatives to PHP. I could have searched for other webhosts to be fair, but it's a freaking slashdot comment -- the one example was good enough to make the point that there are options out there.

      And no, I don't use them or have any affiliation. lowendbox.com isn't a specific provider so again, not shilling for a VPS, and I said at the end of my comment that I declined to mention the one I use because I wasn't posting to advertise for anyone specifcially.

      Also, not everyone has the same load needs, so it IS possible that a lower-priced VPS will be sufficient for many people's hosting needs if they want to use something other than PHP. Plus most providers I've seen will upgrade in-place if you need more than you started with, which could work for small or medium-sized sites.

      I know this reply is late, but I just now noticed I had the tab still loaded and saw your comment. Only bothered responding because the shill insinuation was kind of insulting considering you made it on bad assumptions, so I wanted to correct it. :P

  13. Security bug prone by Anonymous Coward · · Score: 0, Redundant

    The annoying thing is how many sites have so many security vulns due to copy+paste code or poorly written code. It took to long for the language to provide security features and it still lacks it as a default out-of-the-box enforcement.

    Not as bad as perl or bash CGI (shutter), but it could have been better.

    1. Re:Security bug prone by Anonymous Coward · · Score: 0

      ruby apper app app apper app!

      apps!

    2. 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.
  14. just as I am quitting the language by Anonymous Coward · · Score: 0

    after being more than pretty good at C++/Windows/MFC coding for years, I ended up writing websites in java/struts. after a few years of that, quite frankly, I didnt want to program again.

    along came PHP, must been a version 4 offering when i first looked at it. Freedom! no poxy try/catch around converting your text into numbers and other stuff. yes had some basic object stuff - good enough to work with If you could do good design and didnt do anything mental. I enjoyed coding again, once you had your framework up and going things could be remarkably quick.

    the last project i started was a cakephp 2 project about 5 years ago and my job these days has coding only for internal jobs at the uni I work at. over 5 years i've added features and its a pretty good system, works well for what we need and dare I say better than any commerical offering we've seen (bit of a specialist area though) but its getting a bit old, lots of code is a bit of a hotch-potch as parts were hastily written and I dont get enough time to add all the new features we want plus refactor everything (the goal is to open source it - but not like this!)

    so over the last 18 months i've looked at it and just want to make a rest/SPA version rewritten from the ground up. however I look at the PHP landscape now and cannot get any enthusiam. why take a nice simple language and try and turn it into a complicated mess like java? If you want to write like java and have all the features of java, go and write fucking java.

    most of the additions I've seen don't fix anything I would say is fundamentally wrong. Closures? fuck off. likewise Generators. Namespaces? we're writing web apps here, pick a framework and add your stuff to it. you shouldnt be doing any complicated work that might require super specialised computing packages who names might clash. namespace/class autoloading is abused in frameworks so things look nice and neat, so even in frameworks you see people just relying on PSR autoloading code even though you are a fucking web app and you should just require() all the utility classes you are going to use (usual suspects like router, dispatcher, request object, response object,session etc) rather than taking the overhead of autoload. style over substance.

    and FFS what is this fucking obsession with Dependency Injection? you look at frameworks and they list this as like a top 5 feature. who the fuck cares? there's ways round it even if you don't have it.

    and composer - great pick a framework and find 20 libraries you've never heard of and don't undertand with various states of awful documentation slurped into your project.

    Ahead of all that I would like to see is a shorter object notation and/or named parameters. you can keep all that other shit, I would just like to not have to type things like [ 'type'=>'input', 'name'=>'annoying' ] its just annoying keyboard-foo. get rid of quotes when you dont need them and just use a colon or equals eg [ type:input, label:"my label", value:$value] yes you might say but that clashes with definitions - well I've never seen a definition that didn't use ALL_CAPS to show to the world its a definition, just use that.. or use a different array definiton symbols like [[ ... ]]

    so I just feel it is a bloated mess now and not fixing things that would actually be useful.

    Now that MS is putting dot net everywhere, we are going to jump ship for C# and ASP Web API to create a SPA. With a lightweight JS top end, maybe even HP's Grommett? (again the proliferation of OTT JS frameworks is something for another topic).

    Yes C# may be a full fat language, but at least its been designed from the ground up, not had bits nailed on. If I'm going to be forced by frameworks to do stuff like 'proper' languages then we may as well use a proper language.

    1. 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."
    2. Re:just as I am quitting the language by Anonymous Coward · · Score: 0

      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. closures are useful but we've done without them for like 60 years and tbh are more useful in event driven environments. i'd do a whole bunch of other stuff to the language to make it quicker and more expressive to write web apps (what its there for) than syntactic sugar like closures.

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

      as a small dev shop I don't have time to write and maintain my own lightweight framework, so you kind of have to choose something to work with. In the PHP world now all the frameworks are getting huge and complicated (and to my mind no solving the bigger problems) and frankly, if I'm going to be railroaded into something that now makes you use 'proper' code like 'proper' languages, I may as well use a proper language that was well designed to start with, rather than a 20 year old hotch potch where features are nailed in.

      as long as its not frickin java :)

    3. 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."
    4. Re:just as I am quitting the language by Anonymous Coward · · Score: 0

      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.

      Thanks for that I'll have to do a bit more reading on it, I only came to the decision to abadon PHP a couple of weeks ago :) I wont even get a chance to do anything other than a quick play with technologies this year, got a lot of stuff to add and still in that 'I havent touched this for 9 months, what the hell was I doing?' mode.

      if its problematic I can stay away and roll my own mapper with linq, but a good 80% of it is basic CRUD work and the rest uses 'objects' derived from mulitple tables that I currently handle with my own data mapper in Cake

      FWIW, I interviewed at Microsoft a couple years ago,

      funny, I worked there 20 years ago. my current job and previous love of PHP have been a source of amusement to my friends since I left :) Lost a lot of stock options, but there you go....

      they were mainly doing stuff in Javascript (probably Angular+typescript, but I would stay away from that too lol).

      Typescript is ok, an attempt to tame the JS wild west but Angular I agree is like using a nuclear bomb to crack a nut. Thats why the quick look at Grommet seemed promising, really light and none of the bonkersness of the other frameworks whose sole reason to move forwards seems to be to reduce the number of lines they need to write in TodoMVC

      I have an irrational hatred of Python

      No, that's quite rational :) Underlying concepts and stuff is pretty damn good, its when I come to start typing that I want to punch the monitor. in no order:

      important whitespace
      changing comment chars away from standard c/c++ // and /* - really you're just trying to be different like a pathetic goth
      putting 'self' in all object methods

      I keep hoping somebody will write a Ratpython preprocessor (like Ratfor) which allows us to continue using C style. can't be difficult!

      Those are my two-cents.

      Cheers! Always good when more light than heat comes out of an Internet discussion on PHP :)

  15. 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.

  16. 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
  17. PHP by Anonymous Coward · · Score: 0

    From shit to heaps of shit.

    By amateurs, for amateurs.

    1. Re:PHP by Anonymous Coward · · Score: 0

      So it's *perfect* for you.

    2. Re:PHP by Anonymous Coward · · Score: 0

      In case you weren't aware, C was also programmed by amateur language designers who were professional OS developers.

  18. Re:Cue non-programmers linking "A fractal of bad d by vilanye · · Score: 0, Flamebait

    Anyone using PHP is a non-programmer by definition.

  19. Re:Cue non-programmers linking "A fractal of bad d by Oligonicella · · Score: 0

    And anyone shouting 'noob' is a non-thinker.

  20. 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 Anonymous Coward · · Score: 0

      Agree, you can even argue that more then 90% of the code powering the web is written in C. Think of routers, operating systems, hypervisors, databases and don't forget PHP is written in C to.

    2. 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
    3. 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
    4. 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".

    5. 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
  21. "Powerhouse" by mujadaddy · · Score: 1

    You misspelled "Whorehouse" guys...

    --
    Populus vult decipi, ergo decipiatur...
    "Force shits upon Reason's back." - Poor Richard's Almanac
  22. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0

    Says the nonprogrammer. Hushify kid.

  23. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0

    Who shouted 'noob'? Other than you, of course.

  24. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0

    Cue the snobs who look down on others based on a programming language.

  25. 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!

  26. 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 Anonymous Coward · · Score: 0

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

      WHOOSH

      What parent said:

      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?

      The question had nothing to do with "job requirements" -- it was WHY DOES PHP REQUIRE EXTENSIONS BE WRITTEN IN PHP?

      I don't know the truth of that, or how difficult or easy it is, or how other languages compare. I do know you just missed the point completely.

      PHP may be a "thin wrapper around C" (or not so thin) but the question was going the other way around.

    7. 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."
  27. Re:Cue non-programmers linking "A fractal of bad d by kuzb · · Score: 2

    Please define "programmer" for us.

    --
    BeauHD. Worst editor since kdawson.
  28. 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?

  29. 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 Anonymous Coward · · Score: 0

      If the last time you looked at PHP hadn't been in 2003, you would've known that this article is poorly outdated and inaccurate, not to mention that it's for the most part just a bad rant from an author who's more about being anal over computer science than actually getting some programming done. Which goes for you, too: stop spreading that dull article around until YOU have done some programming as well.

    4. 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.

    5. Re:Use === by Anonymous Coward · · Score: 0

      A lot of that has been fixed, or wasn't really an issue to begin with.

      https://news.ycombinator.com/item?id=4177516

      All these complaints, yet PHP continues to securely function as expected, and fast, on lots of websites and internal enterprise systems. A few good developers can usually solve circles around a bloated Java or asp dev team. It works really well for a lot of people, and that's more important than some nitpicking list of things that any good PHP developer has zero issue with.

    6. 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.

    7. 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.

  30. 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.
  31. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 2, Funny

    "Someone who writes PHP and LIKES IT."

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

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

  33. 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....

  34. PHP stigma. by Anonymous Coward · · Score: 0

    PHP devs often take a lot of shit from Java, Ruby, etc developers. Because it is so easy to write code in PHP, it tends to attract people with poor programming skills. However, you could write anything just as good in PHP than you could in any other language. For instance, I think it is easier to write more professional code in PHP than it is in JavaScript, even though I like JS at the moment.

  35. Love It by Anonymous Coward · · Score: 0

    I discovered PHP a decade ago when I needed to implement a very simple LAMP server for a small group of scientists. First, as a C programmer, the syntax was easy (love those semicolons, but what's with those $$$?). Second, it has every kitchen sink function included, When I needed the Levenshtein distance, it was there - levenshtein().

  36. It's great for me by Anonymous Coward · · Score: 0

    It all depends what you want and need. In the last ~10 years I've built numerous sites with PHP and although the language has its flaws, I love it.

    PHP has made me hundreds of thousands of dollars over the years without costing me a cent. (I use a classic LAMP stack w/ mysql for the DB). Pretty much whatever I need, PHP can do it. It's enabled me to make a good living through my own work and creativity, and it hasn't cost me a dime.

    Yes, PHP has warts. No doubt about it.
    Yes, it has some (lots) of inconsistent function-naming. It's annoying but, eh, not a deal-breaker.
    Yes, some functions are weird, like implode(), which can take arguments in any order. I mean, WTF?
    Yes, there are some abstract features in the OO-gobledygook that aren't there or don't frambulate properly or whatever, and I don't care one bit because I don't code any Obect Oriented bullshit.*
    Yes, a lot of the things "PHP-detractors" say are absolutely 100% true. I won't argue, much of what they say is valid.

    And you know what? I don't care. :)

    PHP works for me, and I wouldn't make one extra nickel by switching to another language- any language. PHP does what I need and does it well. It's made me a boatload of money and that's the bottom line when it comes to feeding my family.

    So yes, PHP is a terrible language and I love it!

    *"OMG, you don't code in OO? How do you sleep at night?"
    Answer: "On a big pile of money made by coding stuff functionally/programatically in PHP"

    1. Re:It's great for me by Anonymous Coward · · Score: 0

      So what you're saying is that PHP is your retarded little baby and you love it anyway.

      I salute you sir.

  37. 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...
  38. 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...
  39. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0, Troll

    Sure

    If true, you are in the 0.00001% and why are you using such a poorly designed language when there are many better options and no options that are worse?

    PHP was written by retards for retards.

    reddit.com/r/lolphp is the only lol* board that has new idiocy each week.

    Here are some quotes from the head retard Rasmus:

    I really don't like programming. I built this tool to program less so that I could just reuse code.

    I was really, really bad at writing parsers. I still am really bad at writing parsers. We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you should be using. I don't care about this crap at all.

    There are people who actually like programming. I don't understand why they like programming.

    I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I'll just restart apache every 10 requests.

    He personifies PHP and that is the reason everyone with a clue laughs at PHP

  40. 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...
  41. 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...
  42. 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)?

  43. 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.
  44. Re: Extending an existing PHP app in other than PH by Anonymous Coward · · Score: 0

    The proper language depends on the job. Writing native OS code? Use C/C++. Writing Web pages? Use LAMP stack. Writing a server side data service? ...choose your own adventure already.
    I actually shifted from ASP.net to PHP and I've never looked back.

  45. Re: Cue non-programmers linking "A fractal of bad by Anonymous Coward · · Score: 0

    troll

  46. 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.
  47. So... by Anonymous Coward · · Score: 0

    ...now it has matured into a big silly project? How is that news?

  48. 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
  49. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 0

    Integers that overflow and become floats. Gimme more of those...

  50. 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.

  51. Poor Butthurt PHP-hating Slashdotters by Anonymous Coward · · Score: 0

    Just because you don't comprehend the usefulness of PHP doesn't make your whining about how 'inferior' it is valid. Like all tools, it has its place. I've been building web applications with PHP for about 15 years now. It just gets shit done. Any coder worth his salt can build an application that is every bit as maintainable and secure as any other language. Maintainable != compatible with the latest bleeding-edge version of PHP. Yes, there are trade-offs in choosing PHP over another given language - but that door swings both ways. PHP may very well be inappropriate for your application - but that doesn't mean it's inferior.

    1. Re:Poor Butthurt PHP-hating Slashdotters by Anonymous Coward · · Score: 0

      Bullshit

      Any programmer worth his salt is going to know using PHP is stupid and will use something sane.

      There is no knowledgeable programmer that will use PHP.

      Using PHP means that the programmer is shit, by definition.

      The butt hurt from all the untrained monkeys crying over being told the truth is just sad.

      Either educate yourselves or go flip burgers

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

    Someone trained enough to know PHP is shit.

  53. 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.

  54. 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.

  55. PHP is excellent for the low scale use case by Anonymous Coward · · Score: 0

    Filling up a TB hard drive with PHP code on a machine with less than 1GB of RAM and it will all still work. This makes PHP hosting dirt cheap and is the primary reason why it excels at simple "render this stuff from my database" type applications without having to boot and preload every piece of code in RAM even when it's not being requested.

    This is why it's great for Wordpress, blogs, CMS, marketing sites, simple forms, etc.

    It's bad for long running process and complex multi class web "apps". It definitely has it's place but it's not right for everything.

    Not being the best choice for everything does not make it crap though. Just means that it's not good for what you want.

  56. 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.

  57. Lies by Anonymous Coward · · Score: 0

    You could spend 10 times the effort on PHP than in Ruby and you will still get shitty PHP because PHP the language and API is utter dogshit.

  58. 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.

  59. 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.