Slashdot Mirror


PHP 7.0 Nearing Release, Performance Almost As Good As HHVM

An anonymous reader writes: PHP 7.0 RC2 was released on Friday. In addition to the new language features, PHP 7.0 is advertised as having twice the performance of PHP 5. Benchmarks of PHP 7.0 RC2 show that these performance claims are indeed accurate, and just not for popular PHP programs like WordPress. In tests done by Phoronix, the PHP performance was 2~2.5x faster all while consuming less memory than PHP 5.3~5.6. Facebook's HHVM implementation meanwhile still held a small performance lead, though it was consuming much more memory. PHP 7.0 is scheduled to be released in November.

22 of 158 comments (clear)

  1. Re:Relevance? by Anonymous Coward · · Score: 3, Interesting

    My take on your post is that 1) you caught a glimpse of one or two tiresome platitudes regarding PHP and decided to try play the solidarity card, but 2) you don't do any developing at all because you don't know programming, and 3) you don't do any hosting of any kind, because you don't know anything about that either.

  2. Re:Relevance? by Anonymous Coward · · Score: 2, Interesting

    http://githut.info/

    Nope. Not relevant at all.

  3. Re:Relevance? by Anonymous Coward · · Score: 2, Insightful

    No, it's pretty much a garbage language. Inconsistent, full of insecure pitfalls, goofy syntax and overall completely horrendous. I had the misfortune of dealing with it for years. Never again.

  4. Re:Relevance? by Anonymous Coward · · Score: 2, Informative

    Oh please. I work for a VC firm and do due diligence. While the guys doing server-side Java and C# are still talking about frameworks, the PHP guys are typically already supporting thousands or even millions of users. Yes, getting a good, bug-free v2 out the door is a challenge with PHP, most startups fail before even finishing a good v1. You can't get to v2 if you don't finish v1! I don't think the usual estimate that PHP is ten times as productive is far from the truth. For good, solid server-side code, I don't think you can beat Java with Spring, but it takes a lot longer and is a lot harder and more expensive to find engineers. Despite the fact our entire board and investors are made-up with former Microsoft people, the vast majority of successful startups we've funded have used PHP.

  5. Re: NodeJS by SQL+Error · · Score: 4, Informative

    So from an entirely awful language and environment to just an almost entirely awful one?

  6. Re:Relevance? by dgatwood · · Score: 5, Informative

    Is php even relevant any more?

    Sure. Lots of folks use PHP for writing quick server code, because it makes light work of prototyping things. If you know what you're doing, it is a solid programming language, offering a fairly clean, C-like syntax, without the horror of Perl's backwards instructions and bare regular expressions, the OO bloat of Java, the need to install additional interpreters (problematic on shared hosting services), etc.

    --

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

  7. Re: And que by Anonymous Coward · · Score: 2, Informative

    Cue if you're playing snooker or pool

    ... or if you're calling for someone to begin their performance, as in the OP.

  8. Re: faster php? by Anonymous Coward · · Score: 2, Interesting

    A lot of the language is just a thin wrapper around various libraries, which is why so many functions are like that. Newer functions and classes are much cleaner, but there is a bunch of old junk still in there for compatability.

    Used properly it is a nice language. Unfortunately most people don't bother to really learn it and just copy and paste code. A big flaw in the language is that it let's you get away with really awful code.

  9. PHP works well, if you know what you're doing. by Anonymous Coward · · Score: 5, Insightful

    I've written several commercial grade, industry wide web applications in PHP... can't consider a time when someone has hacked the site, jacked the site, or basically screwed it over because of some piss poor LANGUAGE flaw.

    A great developer is what matters.

    And I've seen my fair share of perl code that was completely stupid, filled with security holes and bugs up the ass.

    Honestly, I've been using PHP for twelve years, and Java, C++, and C# for about as much... and frankly wonder WTF sort of mind it takes to even create a shitty application in the first place.

    Am I an exception to the rule? Probably. But I'm excited for PHP 7. It works... if you know how to make it work.

    I've seen enough shit websites built in PHP, and ASP, and perl, and C#, and JSP/Java... WTFever... and frankly, its not the language that's the problem.

    1. Re:PHP works well, if you know what you're doing. by Pikoro · · Score: 3, Insightful

      nail
      head

      --
      "Freedom in the USA is not the ability to do what you want. It is the ability to stop others from doing what THEY want"
    2. Re:PHP works well, if you know what you're doing. by Tough+Love · · Score: 3, Funny

      When all you have is a hammer, every problem starts to look like a thumb.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
  10. Re:PHP - 21st Century COBOL by MightyMartian · · Score: 2

    I hate PHP, but that doesn't mean I go around waving my dick. PHP is like VB6, it sucks but a boatload of code is written in it.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  11. Re:Relevance? by Tough+Love · · Score: 2

    I would say that nodejs is now a better choice for anything that would be otherwise done with php.

    --
    When all you have is a hammer, every problem starts to look like a thumb.
  12. Re:Relevance? by ShanghaiBill · · Score: 4, Insightful

    I would say that nodejs is now a better choice for anything that would be otherwise done with php.

    You know a language really sucks when switching to JavaScript is considered an improvement.

  13. Cost of deployment of Node.js by tepples · · Score: 2

    I would say that nodejs is now a better choice for anything that would be otherwise done with php.

    Including cost of deployment, especially on a small slice of a leased server? PHP has long had a deployment cost advantage. It also has some very widely used applications. What Node.js based forum software is better than phpBB? What Node.js based wiki software is better than MediaWiki? And what Node.js based blog software is any good?

  14. Six problems, some of which PHP 7 addresses by tepples · · Score: 3, Interesting

    As I wrote in my article about PHP, some very simple coding standards analogous to those described in Douglas Crockford's JavaScript: The Good Parts will work around most of the stuff described in the "fractal" article. This left six distinct points, some of which PHP 7 addresses to an extent.

    • Number-like comparison of strings can never be fully turned off. PHP 7 type hints diminish this somewhat, as you at least know what types you are getting in and out of a function.
    • Parse errors are fatal rather than causing include_once to throw an exception the way Python's import does. PHP 7 converts many fatal errors to engine exceptions.
    • Inconsistent naming conventions and duplicate functionality. PHP 7 removes some of the duplicate functionality.
    • Associativity for the ternary ? : operator is on the less useful side. PHP 7 adds an additional null coalescing operator ?? whose associativity is on the useful side.
    • No keyword arguments. PHP 7 does not change this.
    • No file-level selection of old or new semantics the way Python has from __future__ import some_feature.
  15. Re: Relevance? by jon3k · · Score: 3, Insightful

    Python, Ruby or node.js. I think PHP gets a bad rap, personally. Sure its inconsistent and kind of clunky, but it's very approachable, relatively fast and runs everywhere. But it's also got a big messy history behind it, and it's an easy target to poke fun at.

  16. Performancce is not what the HHVM is about by EmperorOfCanada · · Score: 3, Insightful

    My theory about the HHVM is that you have all this top talent at FB who are forced to either use PHP to work on the core product or they can use other languages but not hang out with the core developers. Thus the HHVM would be much like the JVM in that it would allow for PHP to be end run and other languages could run inside the VM.

    Also working on the VM would appeal to the academic pseudo cred that they want while working at the very heart of FB. In theory this end run will allow these top tier developers to go to conferences and say, I am a core developer at FB, I work on the key features, but I am not a pathetic hack using PHP, I am a god programming in (Haskell, Lisp, Scala, Go, Rust, R, Erlang, etc) and thus I am beyond mere mortals who program in the pedestrian languages that are so far beneath me that can barely think about them.

    All this without spitting in Zuckerberg's face and telling him his life's work was done like a two bit hack using the tools of a nube.

    But some of the wind might be taken out of their sails if PHP 7 comes along and eats at the main metric that they can use to justify this end run. I suspect that somehow stats will be pulled out that show that under carefully crafted circumstances that lowly mortals can barely understand that HHVM is so much better than PHP 7 that it completely justifies the massive efforts that have gone into HHVM.

    The real test will be to see if some organizations such as Wikipedia then dump HHVM to return to the less complex deployment environment found in PHP 7.

  17. Re:Relevance? by SQL+Error · · Score: 2

    What a lot of people fail to recognize about PHP when they rag on it is its immense framework support.

    The problem is, the frameworks are awful too.

    Having said that Node.js has taken over the relevancy of languages such as Ruby in later years (or competitors to PHP).

    Yes, Node.js is a competitor to PHP in sheer misguided awfulness, and a bloody-minded insistence on doing everything in the worst possible way. But that is not, for most of us here, a reason to use it.

  18. Re:Relevance? by Bert64 · · Score: 2, Insightful

    It's more like visual basic... Easy for people to learn, so attracts a lot of novice programmers who write poor code.

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  19. Re:PHP 6.0? by Anonymous Coward · · Score: 2, Informative

    PHP 6 was supposed to be the version after PHP 5.2 (or was it 5.1?).

    However, there where huge snags related with the unicode, which was delaying everything over and over again.

    The end result was that PHP 6 functionalities where cut down and released in subsequent 5.x release in more manageable release steps.

    PHP is a solid language, i just find it infuriating that after all this years, they still didn't realized that to make it a proper language they will need to do some code cleanup in the core of it, specially with the dreadful refresh loop which forces every request to reload the code.

    The opcache alleviates the problem, but it is just a band-aid.

    And language uniformity is something that was always talked about since PHP 4, and never addressed. Even after 15 years of PHP you will still refer to the manual because it is impossible to memorize all the different function names. Is it strlen, str_len or string_length? What comes first the needle or the object?

    And then, there is always the problem of the "script" culture. Bashing a couple of lines of code can solve one problem, but is the code maintainable? Most probably not.

    Proper use of software engineering processes is something that still needs to get into the head of most developers of PHP.

    And nope, just having unit tests is not a solution if your tests are crap.