Slashdot Mirror


PHP 7 Ready For Release (softpedia.com)

An anonymous reader writes: After a long wait web developers can finally start migrating their code to PHP 7. The new version comes with minimal syntax modifications, and is more focused on improving performance and upgrading PHP's core interpreter. Softpedia reports: "As mentioned above, PHP 7 is focused on speed, and benchmarks carried out over the past few months, have shown it to be almost twice as fast as older PHP 5.x releases, and neck in neck with Facebook's HHVM project, a Just-In-Time compiler for PHP code." A full list of new features is available here.

91 of 159 comments (clear)

  1. neck in neck by Anonymous Coward · · Score: 1

    neck and neck, I think.

  2. PHP7 Performance by darkain · · Score: 4, Interesting

    I've been benchmarking the PHP 7 RCs against HHVM and PHP 5.6 for quite some time now with my own framework. I'm still perplexed as to why they are claiming it is faster than HHVM. Maybe in some specific benchmark? On my in-house framework, HHVM pushes nearly twice the requests-per-second performance compared to PHP 7. However, on the command line, PHP both 5.6 and 7 have a significantly faster startup time, but this point is mostly irrelevant for web servers.

    1. Re:PHP7 Performance by mythix · · Score: 1

      I've also been benchmarking my full stack Symfony2 project, and HHVM and php7 are equally fast. (using apache)

  3. PHP has not yet been released by Anonymous Coward · · Score: 4, Funny

    Unlike slashdot's normal habit of running behind the times with news stories, this one is too early.

    PHP 7 is slated for a full release tomorrow.

    Good job guys....

    1. Re:PHP has not yet been released by ProzacPatient · · Score: 1

      PHP 7 is slated for a full release tomorrow.

      Yeah but I won't be able to use it until 2020 because all the commercial hosting servers are still running PHP 4.

    2. Re:PHP has not yet been released by gmack · · Score: 1

      You mean there are downsides to $6.00/month hosting packages? Who knew?

    3. Re:PHP has not yet been released by CastrTroy · · Score: 1

      You can get a virtual private server for about $15 a month and run whatever version of whatever you want on it. There's little advantage to going with a shared host for $6 unless you just want to do something extremely basic.

      --

      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 has not yet been released by gmack · · Score: 1

      Yes but then you have to know how to keep it up to date or it's yet another zombie waiting to happen. I'd rather most people went with a higher quality hosting service.

      Also, $15 is expensive. I pay a lot less than that on OVH.

  4. Re:Marketing by reanjr · · Score: 4, Informative

    I'm not saying the curators of PHP aren't semi-retarded, but the reason they jumped over 6 is because 6 was basically a complete failure. They planned it out, but never managed to deliver. Anything important or useful in v6 was implemented in v5 point releases, and when it came time to put out a new major version, the number 6 had connotations that were undesirable.

    So, I don't think "marketing war" is a fair characterization.

  5. Re:Is it still a clusterfuck? by Narcocide · · Score: 2

    Horrors addressed: 0 ... but at least now you have the option of statically typing variables, it seems.

  6. Re:Is it still a clusterfuck? by Anonymous Coward · · Score: 1

    PHP has addressed several of those issues over time (and in 7). The author of that blog seems to be updating it as things are fixed.

  7. Re:Is it still a clusterfuck? by Anonymous Coward · · Score: 2, Insightful

    "I need static typing" == "I'm too lazy to keep track of what I'm doing with my variables"

  8. Re:Marketing by Anonymous Coward · · Score: 1

    I'm not saying the curators of PHP aren't semi-retarded, but the reason they jumped over 6 is because 6 was basically a complete failure. They planned it out, but never managed to deliver. Anything important or useful in v6 was implemented in v5 point releases, and when it came time to put out a new major version, the number 6 had connotations that were undesirable.

    So, I don't think "marketing war" is a fair characterization.

    PHP 6's big selling point was going to be Unicode support. That's what fell through. The remaining fun features (and more) eventually went into 5.x.

    The problem is that a number of publishers went forward with PHP 6 books - likely to try to stay ahead of the competition. Check Amazon. There's a bunch. And that says nothing about blogs and other online sources. The decision to jump to 7 basically came down to "we'd rather deal with people asking what happened to version 6 than people complaining about how the stuff they saw about 'PHP 6' wasn't true".

  9. Re:Is it still a clusterfuck? by Narcocide · · Score: 1

    Doesn't matter anyway, apparently I was too lazy to read it right too. They only added strict scalar type declarations for function parameters and return values; not quite the same thing.

  10. Who cares?.. by vulpcod3z · · Score: 1

    Where's our 64-bit support?..

    1. Re:Who cares?.. by rubycodez · · Score: 1

      it's there on Windows

    2. Re:Who cares?.. by vulpcod3z · · Score: 1

      "The x64 builds of PHP for Windows should be considered experimental, and do not yet provide 64-bit integer or large file support."
      -

      Kind of important when dealing with cloud servers and big data transfers.

  11. Re:Is it still a clusterfuck? by Theovon · · Score: 2

    Static typing is really helpful if you want to compile, because the function knows ahead of type the data types that will be passed in.

  12. Re:Marketing by SumDog · · Score: 2

    Yea, it's whale guts all over the place.

    I will say PHP7 might be a huge break from that. The parser changed to be a lot more sane and they finally deprecated all those mysql_ functions. There are a lot more real exceptions in core libraries instead of errors that silently get discarded.

    I dunno...it looks a lot less crap. But let's get things straight. PHP4/5 are garbage from a design perspective. There is a lot wrong with their type system. Oh and PHP7 has a type system..that's been bolted on. eh... I'm sure people will find fun new stuff for /r/lolphp
     

  13. Cue the haters by JustAnotherOldGuy · · Score: 5, Interesting

    Cue the PHP haters to flood this topic with endless criticisms and loads of "it's SO awful" stories about how terrible PHP is.

    I've said it before and I'll say it again: I like PHP, and coding in it enabled me to make a shitload of money over the last dozen years or so. It still makes me money every single day, and all at a cost to me of almost nothing. Linux, Apache, mySQL, and PHP -the classic LAMP stack- has been very, very good to me.

    Hate on it all you want, but working alone in my little home office I learned and used PHP to make more than enough money to buy a nice home, travel the world, support my family, and live a very comfortable life.

    Is it the "best" language? I have no idea, but it's good enough for me and that's what counts.

    So please, feel free to tell me how terrible and horrible it is. :)

    --
    Just cruising through this digital world at 33 1/3 rpm...
    1. Re:Cue the haters by cshark · · Score: 1

      I thought most of the PHP haters were Microsoft Visual Studio guys.
      I wonder. Do the evangelists still roam the internet trash talking any language not approved by the big M?

      Or did that go the way of the dodo when Microsoft decided to make hell freeze over by releasing Visual Studio for Linux?

      I must admit, the hate boards have been rather quiet for the last year or two.

      --

      This signature has Super Cow Powers

    2. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      I wonder. Do the evangelists still roam the internet trash talking any language not approved by the big M?

      I have no idea. Frankly, I couldn't care less what Microsoft likes or doesn't like. Or more accurately, I just hope they stay away from anything in the LAMP stack so they don't fuck it up.

      I can see it now: "Microsoft PHP(tm)- from the same great team that brought you Clippy and Microsoft Bob!"

      And of course it would be just incompatible enough with the real PHP so as to cause lots of fucky little problems that would be practically impossible to track down. But thankfully they don't seem to be interested in it at this time- they're too busy fucking up Skype to bother with something like PHP. Maybe when they're done ruining Skype they'll have time to make a proprietary, retarded version of PHP.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    3. Re:Cue the haters by UnknownSoldier · · Score: 1

      Just because you made a fortune selling manure shoveling shit doesn't mean it doesn't stink.

      PHP, like Javascript, are complete clusterfucks written by people who don't have a fucking clue how a good language is designed.

    4. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      Just because you made a fortune selling manure shoveling shit doesn't mean it doesn't stink.

      So what? I still made a fortune. :)

      -

      PHP, like Javascript, are complete clusterfucks written by people who don't have a fucking clue how a good language is designed.

      And guess who doesn't care? (Hint: it's me!)

      The point is, Mr Language Snob, that I really don't give a flying fuck how much you hate PHP and Javascript.

      PHP and Javascript enable me to live in a nice home and drive a nice car and go on vacations with my wife whenever and wherever the fuck I want. You only wish you could live so well, lol.

      So by all means- be as smug as you want in your dreamy little Language Superiority Fantasy land. Just make sure you do your job and wipe down our table after we leave the restaurant, okay?

      --
      Just cruising through this digital world at 33 1/3 rpm...
    5. Re:Cue the haters by hcs_$reboot · · Score: 1

      Is it the "best" language? I have no idea

      We know the answer to this one.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    6. Re:Cue the haters by mcrbids · · Score: 1

      I think I can answer your question, as Mr. comfortable PHP guy's story isn't so different from my own.

      1) PHP isn't the point. Solving a need is. Find a need and devise a solution. Bonus points if there are no other solutions on the market.
      2) Make a solution that works better/cheaper than anything else that compares. May or may not involve PHP/ Python/ Go/ Lua/ Javascript/ Assembler /your dog.
      3) Sell your service to people who need it. Manage it carefully, make sure it really works and keeps getting better.
      4) .... ????? (too many little things to mention)
      5) Profit!

      GP didn't "get rich quick", and neither did I. I spent years pounding the keyboard and the pavement while my solutions matured and got traction. I picked up some partners along the way, as I quickly found that I needed somebody to manage the books, negotiate contracts, run marketing/sales/support, etc.

      Growth rate since the very beginning has been between 20% to 70% per year - solid, organic growth but not VC "start up" growth. We've been solid, stable, and profitable every single year and this year is no exception.

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    7. Re:Cue the haters by hcs_$reboot · · Score: 1

      Bug prone? Check.
      Security issue prone? Check.
      Awkward OOP? Check.

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    8. Re:Cue the haters by TheDarkMaster · · Score: 1

      I develop some systems in PHP because it is necessary for the company (all the systems in PHP that I work are legacy of several years), but I will never do a new system in a language that is unable to save the state of things between a request and another without requiring hacks like putting lots of things in the user session... PHP is shit to develop information systems, get over it.

      --
      Religion: The greatest weapon of mass destruction of all time
    9. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      Bug prone? Check.
      Security issue prone? Check.
      Awkward OOP? Check.

      Made me a shitload of money? Check.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    10. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      ...but I will never do a new system in a language that is unable to save the state of things between a request and another without requiring hacks like putting lots of things in the user session

      Well, good for you. I'm glad that you let a consideration like that drive your choice of language and development path. I, on the other hand, have stuff to do and PHP lets me get it done. I don't really care, because as I've said repeatedly, it makes me quite a bit of money and keeping my family fed is far more important to me than some heinous blather about what it does with user sessions.

      PHP is shit to develop information systems, get over it.

      Sure it is, but it's made me a shitload of money, a concept you seem to have difficulty grasping. Lil' ol' me, working away in my cheesy home office, have used PHP to live very comfortably for the last dozen years or so. And never once have I lost one minute of sleep over how PHP handles user sessions or the way the function calls are inconsistently named. I just wipe my tears away with the checks that keep coming in. :)

      How about YOU get over your nose-in-the-air language snobbery and get back to work? I don't snivel about your choice of language, why does it bother you so much what I use? The fact is that what I use works. Use whatever language you like and stop being such a pathetic code-bigot.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    11. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      The arguments on PHP noted in http://eev.ee/blog/2012/04/09/... are valid point which show that as a language and framework PHP is a mess.

      Yes, PHP has lots of problems, and I couldn't care less. It works very well for me and in my world that's where the rubber meets the road. Sure, PHP has a ton of warts, etc etc etc, and the fact is that I don't care one bit.

      -

      However, if it serves you to build software with PHP, as you have clients who want that, then this is totally fine. Obviously your customers are willing to pay a lot more for development time than necessary.

      The only client I have is me. I build what I want, when I want, the way I want. And so far I've done pretty damn well. I don't know if I'd say that I've been a "smashing success", but I will say that I've done damn well. As I've said, PHP has enabled me to live quite comfortably, travel the world on my schedule, live in a nice home, buy nice cars for my wife and I, support my family very well, make my house payments, etc etc etc. Really, what's not to like about that? :)

      The fact is that many of the people dissing on me here secretly wish they could do as well as I have. It's only partially about the language- a lot of the hate is based around the fact that I've used such a "terrible" language to make a ton of money, and that conflicts with their "PHP is teh suck!" paradigm.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    12. Re:Cue the haters by TheDarkMaster · · Score: 1

      dammit, missing [/ b] after "interested"

      --
      Religion: The greatest weapon of mass destruction of all time
    13. Re:Cue the haters by gmack · · Score: 2

      This problem is inherent to the http protocol itself. It is simply not possible to store state when the connection is designed to drop between requests.

    14. Re:Cue the haters by TheDarkMaster · · Score: 1

      I know that very well. The detail is that if you are using Java for example, you can create system parts that remain active between requests can be shared between them. With PHP you can not do this, each request involves the entire creation (and subsequent destruction) of the entire environment

      --
      Religion: The greatest weapon of mass destruction of all time
    15. Re:Cue the haters by UnknownSoldier · · Score: 1

      > So what? I still made a fortune. :)
      If you're not part of the solution you are part of the problem, but I see all you care about is money. /sarcasm Who needs quality when we can fuck over our customers with insecure crap!

      > PHP and Javascript enable me to live in a nice home and drive a nice car
      Here's your cookie kid. I could sell drugs and have a nice home and nice car too.

      > You only wish you could live so well, lol.
      Typical bogus Strawman argument that has _nothing_ to do with how shit PHP is.

      All that programming experience and you still haven't learn the first rule of programing ??

      * Don't make assumptions -- you're ignorance will get you into trouble.

      > Just make sure you do your job and wipe down our table after we leave the restaurant, okay?

      Remember what I said about assumptions, earlier? I've been shipping computer games for 20+ years. Making assumptions only makes you look like a complete idiot.

      Pointing out the truth that PHP and Javascript were written complete fucktards means I care about making my (programming) job easier, go figure. Gee, why do we have static typing, and static analysis?? To catch stupid mistakes at compile-time instead of blowing up in your face at run-time. Why do you have consistent naming conventions? To make it easier to remember instead of everything being one off.

      Only a complete fucktard would call someone who points out Javascript hacks like "use strict"; a language snob.

      > I really don't give a flying fuck how much you hate PHP and Javascript.

      Apparently you do, since you responded.

    16. Re:Cue the haters by TheDarkMaster · · Score: 1

      The effort it would take to do so is not worth it. For those who are working on production systems like me is simpler to use another language that already have the necessary resources than rewrite PHP from scratch to do things that other languages already do.

      --
      Religion: The greatest weapon of mass destruction of all time
    17. Re:Cue the haters by TheDarkMaster · · Score: 1

      Well... It's because unlike you I work in the real world and have real-world problems, one of them is having to support and alter systems that have been made in PHP several years ago and where such systems can not simply be ported to another language because of the cost in time and money it would cause. Unlike you I can not just throw out all the code that "I do not like", I have to attend actual customers and their systems can not stop working for months to be able to change the language in which they were made. So if the system was already done in PHP he will have to continue in PHP as much as I do not like that.

      And as I know you will not understand any of that, there's the short version: In the real world you do not have the privilege to throw out systems at will, you have to keep them running in some way even when they are made in a language that only makes things worse to you as PHP.

      --
      Religion: The greatest weapon of mass destruction of all time
    18. Re:Cue the haters by dgatwood · · Score: 1

      Most of PHP's quirks are because it does not abstract you very far from C. And I know the author claimed that this wasn't a valid point, but it really is. PHP is an interpreted C with mandatory sigils (dollar signs) and basic support for classes. Every release seems to move it even closer to C, because that's the language that a lot of people know and are comfortable working with.

      What makes PHP crucially different from C is that it is an interpreted language, which means you don't have to recompile and relink every time you make a change. When you're doing web development, that design saves a lot of time. So the author's "Just write C" comment is just silly. Besides, mod_php is faster than CGI (or even FastCGI), so depending on the interpreter penalty, the PHP code may be faster than C. And with the performance improvements in PHP 7, that's an even more likely scenario.

      Also, PHP's template capabilities (mixing HTML and snippets of PHP) make it better for some types of web programming than C.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    19. Re: Cue the haters by prefec2 · · Score: 1

      The cause of the mess is most likely also known to the author of the blog post. Still it is not a good language design and that is what all the critic is about.

    20. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      It is not "snobbery", my dear moron...

      It's snobbery or elitism, take your pick. Why you feel compelled to whine about a particular language is of no real interest to me. Feel free to snivel all you want.

      By the way, what language have YOU written that's become incredibly popular and runs on practically every platform in existence? What language have YOU written that's in use on hundreds of millions of web sites?

      Recently I could not attend a change requested by one client because of the PHP can not blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah....

      Yeah, sure, whatever. Guess it sucks to be you, forced to use a language that raped your mom, shot your dog, ate all your ice cream and then left the toilet seat up.

      -

      And I do not fucking interested if that crap gives you a lot of money (if I can take your word seriously about it, I must say)

      Lol, well I must say that I don't care if you take me seriously or not. I don't know you, I don't want to know you, and your ranting about this awful language that's made me hundreds of thousands of dollars from the comfort of my home only makes me smile. :)

      While you're busy ranting, I'm relaxing and having fun listening to you bitch and moan. But yeah, the fact is that PHP has made me a shitload of money, and that's the part that really grinds your gears. You probably don't give two fucks about the language (you can probably just barely use it) but the idea that I've used it to live a carefree life is what really bothers you, lol.

      -

      it is still a shitty language to make proper information systems.

      Well lah-dee-fucking-dah, I'll be sure to mention that to the maid. I bet she'll be totally pissed about that.

      "Hey Tina, did you know that PHP is a shitty language to make proper information systems?"
      "Oh no, Mr OldGuy, why that's just terrible! Should I warm up the sauna for you now?"

        -

      And if you are more of those with serious reading comprehension problems here's the short version: PHP does not have a lot of critical resources today to make a good system, and is why I hate when I have to use it.

      Well I just feel awful for you, you poor thing.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    21. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      Well... It's because unlike you I work in the real world and have real-world problems,

      Oh my god, that sounds simply dreadful. The "real world", ewwwwwwwwwww!

      --
      Just cruising through this digital world at 33 1/3 rpm...
    22. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      If you're not part of the solution you are part of the problem, but I see all you care about is money.

      Oh no, I care about my wife and my son and my businesses, and I care about my hobbies and I care about if it's going to be too hot in Thailand when we go there in the next few weeks and I care about my neighbor who's not been feeling well lately, and so on and so forth. There's lots of things I care about besides money. The money just allows me the freedom to care a little bit more effectively. :)

      -

      I could sell drugs and have a nice home and nice car too.

      Yes, but that would be illegal and what I do isn't illegal. Besides, I doubt a hoser like you would last 5 minutes on the street selling drugs. You'd be robbed, cuffed, and stuffed inside of an hour.

      -

      I've been shipping computer games for 20+ years.

      Lol, sure you have. I totally definitely absolutely believe you, really I do. :)

      --
      Just cruising through this digital world at 33 1/3 rpm...
    23. Re:Cue the haters by amacide · · Score: 1

      Bad day? Your rage, anger & elitism stinks. Haven't posted in a decade but to say that.

      Agree with OP. 20 years now I've made a great life from PHP, Linux, MySQL, blah blah, and what you may consider other "manure".

      Right tool for the job. A lot of IT is shoveling manure, so why not use PHP? ;-)

    24. Re:Cue the haters by TheDarkMaster · · Score: 1

      Ohhhh... Says the "almigth" AC. Go back to your basement and learn how to understand what you read before you try to answer and only make you being shamed on the process okay? ;-) For your information my systems benefits millions of people successfully (literally), and recently I won a UN award because of one of them. While you ... pff

      --
      Religion: The greatest weapon of mass destruction of all time
    25. Re:Cue the haters by cshark · · Score: 1

      And of course it would be just incompatible enough with the real PHP so as to cause lots of fucky little problems that would be practically impossible to track down. But thankfully they don't seem to be interested in it at this time- they're too busy fucking up Skype to bother with something like PHP. Maybe when they're done ruining Skype they'll have time to make a proprietary, retarded version of PHP.

      Wait, you mean like, Microsoft is going to develop HHVM?

      --

      This signature has Super Cow Powers

    26. Re:Cue the haters by cshark · · Score: 1

      Fair assessment.
      At least you're not being mean about it.

      --

      This signature has Super Cow Powers

    27. Re:Cue the haters by cshark · · Score: 1

      Is that still the case since Microsoft released Visual Studio for Linux?

      --

      This signature has Super Cow Powers

    28. Re:Cue the haters by hcs_$reboot · · Score: 1

      __construct(), $this, -> for starters

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    29. Re:Cue the haters by JustAnotherOldGuy · · Score: 1

      Wait, you mean like, Microsoft is going to develop HHVM?

      Oh shit. Time to retire and move to an island in the South Pacific.

      --
      Just cruising through this digital world at 33 1/3 rpm...
  14. Re:MILLENNIAL ALERT! MILLENNIAL ALERT! by Anonymous Coward · · Score: 1

    Only a Sith deals in Booleans.

  15. Hey hipsters OTP greater than PHP 7 ?! by Billly+Gates · · Score: 1

    Erlang is the shittier man compared to PHP and is sooo kewl with this new version of Erlang called "Outlaw Techno Bitch!?" It's the new trend with your NoSQL database

    See all the details here

    1. Re:Hey hipsters OTP greater than PHP 7 ?! by cshark · · Score: 1

      I'm too good for Erlang. I only code in Golang, Rust, and other languages nobody uses.

      --

      This signature has Super Cow Powers

  16. 7 is far less of a fustercluck than 5.2-5.3 by tepples · · Score: 4, Informative

    The last time I compared Eevee's "fractal" article to ManiacDan's "hardly" rebuttal, I found that PHP's alleged problems fit into two categories: those that can be easily worked around with coding standards, and about a half dozen real issues.

    PHP 7 has completely addressed one of the real issues, namely parse errors in include being fatal, by introducing engine exceptions. Function argument and return value type hints add some of the benefits of Python-style strong typing to PHP. And though associativity on ?: is still on the less useful side for reasons of backward compatibility, the new null coalesce operator ?? is on the proper side for chaining.

    1. Re:7 is far less of a fustercluck than 5.2-5.3 by Anonymous Coward · · Score: 1

      Ignoring the fact that ManiacDan's rebuttal can hardly be called such, because it's basically a bunch of clueless ramblings by an amateur developer who doesn't understand why he's wrong, I notice your supposed list of actual problems misses an awful lot of real actual problems. I can only conclude therefore that you're a PHP fanboy. Honestly, anyone with even the slightest clue about programming languages (we're talking CS101 level of education) would read ManiacDan's post and be able to spot the countless flaws within it - the fact that you haven't speaks volumes about your inability to properly asses this topic as you're trying to do. Look at some examples:

      "Just look at his list of "surprises": mysql_real_escape_string? OH MY GOD! SHOCKING! What the hell is he talking about?"

      Seriously? You think a guy that can't see why the official API for a language has to have a mysql_escape_string and a mysql_real_escape_string isn't a problem? He doesn't understand that their API contains a broken implementation, and then one you're supposed to use, the "real" one without any deprecation of broken code is a comically bad situation for a language to be in and he asks what the original author is talking about? If it's not obvious, I'll make it clear - if you have a broken function, and a working function, with the working one named real, there's a chance people will not realise this, use the broken function, and end up with broken vulnerable code. That's objectively bad, and you can't dismiss it with "What the hell is he talking about?".

      "Consistent - Apparently things that look the same should work the same in a programming language?"

      He doesn't even understand the discussion here. He thinks consistent means consistent above languages, the problem is that PHP doesn't behave consistently even within the language.

      "He makes statements about "boilerplate" a number of times, but never defines the term or tells us what he's talking about."

      This guy shows his level of amateurity here, this is a common term in programming circles to define code that you have to repeat but should not need to.

      "Reliable - This, again, is him assuming that it's the language's responsibility to be understood, rather than his responsibility to understand it."

      Understanding an unreliable language wont make it reliable.

      "The language is full of global and implicit state
      Server-level configurations are pretty handy and remove a lot of boilerplate, don't you think? Good thing removing boilerplate was one of his biggest criteria back at the beginning."

      Here he doesn't understand the problem and passes it off as something else then pretends he is right. If he can't even understand the issue how can he be right?

      "There is no threading support whatsoever.
      It's purely a web language, and nothing else. Websites don't need threads, because if they take longer than a second to run they've failed. Again, fundamental lack of understanding."

      This... wow, it's just fucking hilarious. Websites don't need threads, spoken like a massive amateur. What if you want a web based interface for processing lots of customised e-mail messages based on content submitted from a form? His declaration is that you either don't ever get to do this because apparently it's something websites would never do (which is wrong) or that you keep the user hanging on a single thread risking that the job may time out in fail. This guy couldn't be more clueless if he tried.

      "C and Python crash fatally, potentially destroying the memory space of other programs. Got it."

      Bwahahahahahaha. Oh God, I don't even have words for this one it's such a wrong understanding.

      "This one I actually know nothing about. Do other languages have built-in user authentication which can work as a login system? So if I want to write a web login system in Python, there's a built-in language core module for that?"

      And so it comes out. He only knows PHP. Therein lies the problem, if he only knows PHP, how can he rationally pret

    2. Re:7 is far less of a fustercluck than 5.2-5.3 by rev0lt · · Score: 1

      Well, threads aren't really that important in the PHP context. Keep in mind, most PHP applications are run via CGI or similar, so they are stateless from a request point of view - at each request the whole application is bootstrapped, run and then exits.The notion that you could fire a tread to do some heavy lifting while the rest of the application executes is, well, naive - the application only exits when all work is done. Also, in some languages (e.g. Java) there is no guarantee that threads will execute on a separate processor, so its not obvious threading will translate directly into performance gains. But hey, let me just point out that PHP actually has pthread support - http://php.net/manual/en/book...., so if anyone wants them, they can use them.

      Like every language, PHP has its shortcomings. Some of them are quite ugly (I do identify with most of the issues pointed by "Fractal of Bad Design", and also think the rebuttal is somewhat hilarious), but what productive language doesn't require you to know more than 100 pages? Good programmers will write good code, regardless of the syntax. And its not a general purpose language - at all. Even in web development, there are a lot of situations where PHP is a poor choice. There are also a lot of situations where it is an acceptable choice, regardless of the flaws. Complaining about mysql_* when PDO and prepared statements exist for more than 10 years is also quite amateurish. Every language allows you to shoot yourself in the foot. Granted, PHP does give you a lot of options in this regard, but hey - you can shoot yourself in the foot with C, Java, Assembly, Perl, Python, Erlang or whatever is your poison. Every language has a niche, and failing to understand that is, well, dumb. And in the end it's all ones and zeros being executed in a processor.

    3. Re:7 is far less of a fustercluck than 5.2-5.3 by tepples · · Score: 1

      If you have four cores and three requests in PHP, each request can run in a PHP process on a separate core, with a persistence layer such as MariaDB on the fourth. This stateless model makes threading not quite as critical as it would be in a more stateful application server model. Perhaps what was meant was the use of multiple threads to serve a single request or more batch-like processing in the background.

    4. Re:7 is far less of a fustercluck than 5.2-5.3 by Ash-Fox · · Score: 1

      Sorry to go off topic, Tepples. Mind if I steal your signature? I believe we have a mutual friend that needs to hear this repeated numerous times.

      --
      Change is certain; progress is not obligatory.
    5. Re:7 is far less of a fustercluck than 5.2-5.3 by Ash-Fox · · Score: 1

      There is no threading support whatsoever.

      I'm pretty certain I have been using PHP threads for almost a decade now...?

      --
      Change is certain; progress is not obligatory.
    6. Re:7 is far less of a fustercluck than 5.2-5.3 by tepples · · Score: 1

      Go ahead and reuse this or any of my past signatures.

    7. Re:7 is far less of a fustercluck than 5.2-5.3 by rev0lt · · Score: 1

      (...) Java runtime not using the native multi threading implementation (...)

      Well, AFAIK you cannot perform processing affinity on Java threads. And also AFAIK it's not part of the POSIX standard, so it's often up to the system scheduler (depending on whether you're using a userland implementation or a kernel-based one) to decide that. You ASSUME it will use all cores.

      the realistic use case happens to support multiple processors

      The realistic case is that you have no control over this in Java or a standard POSIX implementation. However, eg. Linux does provide extensions for this.

      Also one of the features of multi threading is working around blocking API calls, one thread can work while the other is in sleep mode waiting for data from network or disk and the CPU would be otherwise idle ( of course using an async API when available is better ).

      I'd suggest you look at some async subsystems to realize this often isn't really an advantage (GIANT was removed from Linux in 2011, not that long ago), and add it the complexity of syncing thread state and application state.

    8. Re:7 is far less of a fustercluck than 5.2-5.3 by rev0lt · · Score: 1

      That's not naivety, that's a deficiency in PHP, you're fobbing it off as a problem in understanding, when in reality it's simply that PHP is poorly designed.

      Well, I did quite some work in assembly. I didn't have any thread mechanism available as a core feature of the language, so I'd assume you'd also say CPUs are poorly designed.

      There's nothing inherently wrong with wanting to send something off for processing in the background so that the main execution thread can return a response to the user.

      No, there's not. What is wrong is the notion that you can only accomplish this by using threads.

      The fact PHP can't do that is a problem with PHP, not naivety on behalf of someone wanting to do that because it's sometimes a legitimate thing to be able to do.

      Sometimes I want to be able to issue syscalls. Its a legitimate thing to be able to do, and PHP doesn't allow me to do it easily. Or manage how memory is allocated. Or see an assembly dump of what's being executed. Well, its a limitation. So what?

      If you think thread usage is purely about performance

      I have great difficulty in having a valid discussion with someone that only performs a naive syllogism when reading a sentence, but I'll bite. If you're deferring tasks to be background processed so you can continue execution, it IS about performance, even though it wasn't what I wrote.

      So what you really mean here is that PHP has a 3rd party beta threading implementation that may or may not work on your host

      You mean, a package? Like basically every functionality available in every other language or operating system? Hey, PHP doesn't support Memcache also. Its an external package. And in Linux, bad luck - all those basic I/O functionalities are also available in a separate package. You know, like the one the JVM uses (GlibC).

      If you do not have enough experience of web applications to realistically understand why you would want threads

      Ahh the ad hominem attack. Well, I could say that if you cannot solve your problems without using threads you should be doing something else instead of programming, it doesn't really add nothing to the conversation, does it? By your reasoning, I'd say you're against using eg. PostgreSQL as a database server because isn't threaded. Oh well.

      All this ignores the absurdity of the broken argument being made here - PHP is fine because it doesn't need threads, but it's got a barely working threading implementation because it doesn't need it, what?

      PHP also has Sybase and Oracle support. I'd guess most developers don't really need that, and the language itself doesn't really need that, but exists. At this point I realize why you prefer to stay anonymous.

      Before that it was solved in the most absurd ways by firing up a whole extra process with cURL, but you probably wont understand the performance implications of such a heavyweight action either.

      Yah, probably not. I usually don't cater to smart-asses in the internet.

      The worst part is, most PHP developers are at such an early stage in their development careers that they're not even equipped to understand why it's broken

      So, it's the newbies fault, huh? I often see shitty production code done in Java or C# than in PHP, but it's obvious we have a different definition of shit.

      No they wont, this is absolute bullshit. I don't care how good a programmer thinks they are, if the language has more gotchas then code written in that language will over time, be inherently more buggy than code written in a language with less gotchas, and therein lies the problen

      Well, since you're so full of certainties, can you demonstrate it? If you have a look at ht

  17. The right job for the tool by swm · · Score: 2

    So I just...uhhh...happened to be on this site called imagefap.
    They have a banner on their front page advertising for PHP devs.
    And I couldn't help thinking that someone has finally found an appropriate use for PHP...

  18. Re:MILLENNIAL ALERT! MILLENNIAL ALERT! by frnic · · Score: 1

    I am 65 and retired, and I use hater all the time. So, so much for your theory. I also noted that he was willing to post with a name, as opposed to hiding behind anonymous. Which degrades your post even further in my humble opinion.

    I have worked in several major corporations and with probably every language you have ever heard of and then some, and PHP is no different than any there - it is no more secure or insecure than the programmer makes it and the application it is used in.

    But, have fun hating, it seems to be what you are best at.

  19. Logan's run for languages by goombah99 · · Score: 4, Funny

    All languages start out cute and fuzzy then become smelly adolescents. By the time they hit 7.0 there should be a logan's run for languages.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  20. I'm looking forward to this. by cshark · · Score: 1

    I started working in php when version 3 came out.
    I feel like I've really grown as a programmer since then, and I've done my best to stay on top of the new features and practices in subsequent versions of php.

    Reviewing the new features for php 7, I have to say that I'm excited about the strong typing features, especially. HHVM was appealing because they got there earlier, but it's nice to see the main branch of php getting to a place where everybody agrees that statically typed code is a good idea.

    I may not feel this way in a few months.
    But for now, I'm on cloud 9.

    --

    This signature has Super Cow Powers

    1. Re:I'm looking forward to this. by cshark · · Score: 1

      Current version seems to be the exception.
      But historically, php has been a fantastic prototyping language.
      You can do things very quickly in php when you get fluent in it. The adhoc nature of the thing makes it great for developing one offs.

      That's changing though.
      The new version feels like it's a lot more formal than older ones.

      I may be wrong.
      Give me a week, I'll tell ya.

      --

      This signature has Super Cow Powers

  21. Re:Is it still a clusterfuck? by hcs_$reboot · · Score: 3, Funny

    All of them have been addresses. Below is sample code of what PHP7 looks like

    public static void main(String[] args){
    Scanner scannerToReadAirlines = null;
    try{
    scannerToReadAirlines = new Scanner(new File("airlines.txt"));
    }
    catch(IOException e){
    System.out.println("Could not connect to file airlines.txt.");
    }
    if(scannerToReadAirlines != null){
    ArrayList<Airline> airlinesPartnersNetwork = new ArrayList<Airline>();
    Airline newAirline;
    String[] airlineNames;

    }
    }

    --
    Slashdot, fix the reply notifications... You won't get away with it...
  22. Re:MILLENNIAL ALERT! MILLENNIAL ALERT! by imac.usr · · Score: 2

    If you are not with me you're ?TYPE MISMATCH ERROR

    --
    I use Macs for work, Linux for education, and Windows for cardplaying.
  23. Re:Cue the haters [job security vs. good] by Tablizer · · Score: 2

    Cue the PHP haters...[but] coding in it enabled me to make a shitload of money over the last...

    Job security and "good language" are very different things, and perhaps inversely related. The screwier the language, the more time it takes a coder to work with it. More paychecks for you, perhaps, but the company could be paying more compared to a "good" language.

    It's like asking an auto-mechanic if a Ford Escort car is any good. Good to own, or good for his wallet?

    I'm not judging PHP here, just questioning the perspective of your metric.

  24. What about Unicode support? by Max_W · · Score: 2

    Some PHP 5 functions do not work correctly with UTF-8 encoding of Cyrillic alphabets. There is usually a work-around. Still I am curious if there will be some updates of Unicode support in PHP 7?

    1. Re:What about Unicode support? by TFlan91 · · Score: 1

      If I'm not mistaken, that was the goal of PHP 6 and they abandoned it.

    2. Re:What about Unicode support? by Mathieu+Lu · · Score: 1

      Do you have an example of a particular function?

      A lot of the old "core" functions do not support UTF-8. They support only single-byte encodings (pre-UTF8, ex: deprecated KOI encodings).

      To give a silly example, mb_strtoupper() should be used instead of strtoupper(). http://php.net/manual/en/funct...

    3. Re:What about Unicode support? by Max_W · · Score: 1

      Do you have an example of a particular function?

      For example, ctype_upper() http://php.net/manual/en/funct...

      There is no mb_ctype_upper. I wrote a workaround, for about 5 - 7 lines, but it would be nice to have this function for Cyrillic letters too.

    4. Re:What about Unicode support? by mat74 · · Score: 1

      there is a nice library to works with string in php : http://hoa-project.net/En/Lite... maybe it can help you

  25. Re:Marketing by Zontar+The+Mindless · · Score: 1

    The problem is that a number of publishers went forward with PHP 6 books - likely to try to stay ahead of the competition. Check Amazon. There's a bunch.

    I can confirm that there's a book, listed on Amazon under my name as author, but never actually written, for exactly this reason. The publisher went ahead and told Amazon it'd be available on such-and-such a date, then cancelled the project a month or so later. They apparently didn't bother to tell Amazon about this before going into receivership a month or two after that.

    For a couple of years afterwards, I had to explain to people that, no, the book didn't actually exist and that I've no control over what Amazon put on their website. I even tried contacting Amazon about this, and their response was that they'd have to hear from the publisher to do anything about it. So 6 or 7 years later... it's still there, but the subject is now sufficiently out of date that no-one asks about it anymore.

    --
    Il n'y a pas de Planet B.
  26. Re:Cue the haters [language feature wishlist] by Tablizer · · Score: 1

    PHP, like Javascript, are complete clusterfucks written by people who don't have a fucking clue how a good language is designed.

    To be fair, all the common scripting languages suck. C#/VB.net is actually a fairly decent "compiled" language (ignoring the MS API's and environment).

    But, the common scripting/dynamic languages out there all suck in different ways. (I suppose a lot of it is subjective.)

    Here are the main features I'd like to see in a "production" dynamic language:

    * Non-type-tag-based type system. Whether "123.4" is a string or number depends entirely on the operation acting on it. You don't have to test for a hidden type tag/indicator. I hate those. I want WYSIWYG typing for scalars. Perl and ColdFusion almost got it right. (Perhaps it can store probable numbers as floating point under the hood as a speed optimization, but such "compression" should be hidden from the programmer and not affect results/output.)

    * No overloading of common operators such as "+" for both addition and string concatenation. And better syntax or built-in functions to explicitly indicate comparison types. Perl almost got it right, but it's too easy to forget and cross confuse. There are some interesting solutions to this.

    * No white-space block indicators, per Python/Ruby. Use either {...} and/or foo...end foo.

    * Optional and optionally named parameters. MS's recent languages did this fairly well.

    * Better parameter type checking options/syntax (via parsing if need be).

    * Type name should come after variable name in declarations, not before. The C family fucked this up. Pascal and VB do it better.

    * Modern set-based switch/case statement. C's "break" is fucked.

    * A real OOP system, not JS's anonymous function-based bastard.

    * Don't sacrifice rank-and-file features for cutesy FP or meta-programming. I'm not necessarily against those, just don't screw up the regular parts to make FP/meta easier or shorter if a trade-off arises. Take care of business before you go Lisp-y or hacky.

    * Maps and objects are the same thing. It's one of the few things JS almost got right.

    * One-based indexing for string dissection. It makes the string functions much cleaner than zero-based.

  27. Re:Is it still a clusterfuck? by Anonymous Coward · · Score: 1

    Here is the php5 version
    <?php
    $airlinesPartnersNetwork = file('airlines.txt');

  28. Re:Is it still a clusterfuck? by Mouldy · · Score: 1

    Actually, that's the php4 version. You haven't used any features 5 brought to the language. Specifically, 5 was a massive leap forward in terms of OOP.

    A more PHP5-esque implementation would probably use the SplFileObject class.

    But no, you're right, what the internet needs is more examples of how to use the language badly. I'm sure I could come up with a dated, not-recommended way of opening a file in $arbitraryLanguage too.

  29. Re:Marketing by AmiMoJo · · Score: 1

    Sounds like they a great developers. They realized they had goofed and instead of trying to ram crap down everyone's throats they went away and fixed it.

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

    And it will stay that way for the foreseeable future, as fixing things would require to come up with a new language. This would be a little bit like VB6 to VB.net transition. VB6 not even had a grammar. And I do not mean they did not publish a grammar, MS did not have one. When they developed VB.net they had to come up with one. Therefore, not everything could be realized in the new language.

    To make PHP a language which can be used without harm, it needs strong typing. Strong and static typing helps people to avoid mistakes. You can see what happens when you allow to much dynamic typing, like in Groovy, which can compile, but then at execution fail randomly because one type case was not considered. This also may happen when some other class and code is changed.

    And the second thing is library cleanup.

  31. Re:Its deliberately slow by rev0lt · · Score: 1

    how slow it was

    Contrary to popular belief, most applications doing real useful work wait the same time for the database, regardless of the language. Maybe a "hello world" is not a good example.

  32. Re:Cue the haters [job security vs. good] by JustAnotherOldGuy · · Score: 1

    I'm not judging PHP here, just questioning the perspective of your metric.

    Ii understand. My metric is pretty real-world based, that is, does it make me money? And the answer is "yes".

    I'm willing to overlook or ignore a lot of other metrics when it comes to putting food on my table or supporting my family.

    Sometimes "good enough" is good enough. For me, PHP is certainly "good enough". None of its bugs, warts, or annoyances (of which there are plenty) make me lose one minute of sleep.

    --
    Just cruising through this digital world at 33 1/3 rpm...
  33. No it has not been released officially by mythix · · Score: 1

    The tag was made, but tags can change. no official release statement has been made yet.

  34. Thanks! by Theovon · · Score: 1

    I just wanted to thank you for those other links. I enjoyed reading the various opinions about PHP and its problems, and that was well worth the negative score I got for my comment.

  35. Re: Marketing by lokedhs · · Score: 1
    People who are both good developers and value freedom aren't using PHP.

    That is, of course, aside from the fact that the "freedom" offered by PHP is similar to the freedom you have to wear a ski mask in a bank.

  36. Re:Marketing by lokedhs · · Score: 1

    The point is that PHP has completely lost it's position as the default language for web development. It had that status and has now lost it. People think of PHP as 'legacy' now.

    And this is bad exactly why?

  37. Re:PHP Upgrades by wimg · · Score: 1

    You can always try running this on your code first : https://github.com/wimg/PHPCompatibility

  38. Re:Marketing by fastasleep · · Score: 1

    Aren't readers going to be confused by your PHP 7 book if they never got to read what happened in your PHP 6 book?

  39. Re: Marketing by billcopc · · Score: 1

    Agreed (minus the personal attack)

    PHP, much like Perl, gives you the flexibility to shoot yourself in the foot if you so desire (or don't know any better).

    That's not PHP's fault. Just because other languages and compilers treat the programmer as a helpless child does not mean those languages are better at getting work done. They're just designed around the reality that the vast majority of programmers today are extremely naïve and underqualified. It's like putting a blade guard on a manual can opener, just in case some new and improved idiot ever tries to put their dick in it.

    --
    -Billco, Fnarg.com
  40. Re:Marketing by billcopc · · Score: 1

    Funny, I seem to have no difficulty getting paid to write PHP. Can't say the same for Python, Ruby and whatever else the kids are into these days.

    If it has lost its position as the predominant web language, then I guess the vast majority of hosting companies are wrong, and so are their tens of millions of clients. You really ought to tell those poor people, AC.

    --
    -Billco, Fnarg.com