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.

11 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: NodeJS by SQL+Error · · Score: 4, Informative

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

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

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

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

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