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

62 of 281 comments (clear)

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

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

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

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

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

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

    10. 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+
    11. 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."
    12. 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*
    13. 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.

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

    19. 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
    20. 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!
    21. 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.
    22. 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?

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

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

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

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

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

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

    5. 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.
    6. 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.
  5. 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."
  6. 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 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?
    3. 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!
    4. 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.'"
    5. 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
    6. 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
    7. 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.
  7. 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.

  8. 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+
  9. 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 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
    2. 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".

  10. 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 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
  11. Re:Good PHP Code is Possible by preaction · · Score: 2
  12. Re:Cue non-programmers linking "A fractal of bad d by kuzb · · Score: 2

    Please define "programmer" for us.

    --
    BeauHD. Worst editor since kdawson.
  13. 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.
  14. Re:Cue non-programmers linking "A fractal of bad d by Anonymous Coward · · Score: 2, Funny

    "Someone who writes PHP and LIKES IT."

  15. Re: awwww by tshawkins · · Score: 2

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

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