Please create an account to participate in the Slashdot moderation system


Forgot your password?
PHP Programming

PHP 7.0 Nearing Release, Performance Almost As Good As HHVM 158

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.
This discussion has been archived. No new comments can be posted.

PHP 7.0 Nearing Release, Performance Almost As Good As HHVM

Comments Filter:
  • Relevance? (Score:1, Insightful)

    by Anonymous Coward

    Is php even relevant any more?

    It seems to be exclusively In the domain of non programmer - the kinds who constantly pump out insecure code.

    And boy there is a lot of insecure web apps. I don't run php on a public facing server. For me it's the server version of flash on the desktop. You just know there's another joke just around the corner.

    • Re: (Score:3, Interesting)

      by Anonymous Coward

      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.

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        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.

        • It gets the job done and makes me money every single day, so honestly, I don't care how inconsistent it is or how silly the syntax seems. I make my house payment with PHP every month and that's the bottom line.

    • Re: (Score:2, Interesting)

      by Anonymous Coward

      Nope. Not relevant at all.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      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 c

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

        • Re:Relevance? (Score:5, Insightful)

          by ShanghaiBill ( 739463 ) on Saturday September 05, 2015 @09:44PM (#50464947)

          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.

          • You know a language really sucks when switching to JavaScript is considered an improvement by one random guy on the internet.


        • 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?

          • by Anonymous Coward

            none. node.js is not reliable enough in a production server environment.
            Its ok for proof of concept and testing out ideas, but garbage for infrastucture.
            I've pulled all our code out of node.js now for our product, just to get something I don't have to watch like a hawk.
            PHP is reliable at least.

            • As for not being production ready, the Joyent IaaS solution SmartDataCenter [] heavily uses Node.js
              It is used on many public / private cloud including Joyent public one..

          • 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?

            1) None.
            2) None.
            3) None.

            They don't exist because writing these applications in Hode.js would be stupid and pointless.

            (I personally prefer SMF to phpBB, but both of them are pretty capable forum systems.)

          • Node.js forum software => NodeBB []
            I use it and IMHO it is pretty decent

            Node.js blog software => Ghost []

      • The fact is that PHP works. It gets the job done. Most everything else is irrelevant to me.

        The fact is that in the last 10 ~ 12 years, PHP has made me hundreds of thousands of dollars and hasn't cost me anything. It works, I like it, The End.

        If these nancy-boy frou-frou programmers turn their nose up at it, good for them. But PHP is making me money every day, allowing me to goof off and live a life without of relative leisure, while they have to drag their "elite-coder" asses into work each day and grumble

    • Weekly PHP bashing contest starting in 3...2... Aaaand I was late.
    • by Anonymous Coward

      So to avoid the "server version of flash" you use what? Javascript? Straight html? Wait, let me guess: Java?

      • Re: Relevance? (Score:4, Insightful)

        by jon3k ( 691256 ) on Saturday September 05, 2015 @11:04PM (#50465303)
        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.
        • by Anonymous Coward

          you are whitewashing. ALL the stuff done in php is horribly insecure. unfit to be operated if not locked tightly into some small intranet.

          here they hacked an entire cloud provider, hetzner, by means od some php dreck gui tool.

    • Re:Relevance? (Score:5, Informative)

      by dgatwood ( 11270 ) on Saturday September 05, 2015 @07:52PM (#50464585) Homepage Journal

      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.

      • by Art3x ( 973401 )

        At first my web stack was: 10% JavaScript, 60% PHP, 10% Apache, and 20% PostgreSQL.
        Now it's more like: 30% JavaScript, 10% PHP, 20% Apache, and 40% PostgreSQL, as I learned more about those other layers.

        I try to limit the PHP to just a thin connection layer to the database:

        $db = new PDO;
        $q = 'select a fairly refined query that does all the calculation and filtering';
        $q = $db->prepare($q);

        and as a templating language, using short tags and the alternate syntax:

        <? foreach

    • Re: (Score:3, Insightful)

      by Bert64 ( 520050 )

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

    • Is php even relevant any more?

      2003 called, they want their lame "PHP is for teh losers" joke back.

      The fact is that PHP has made me hundreds of thousands of dollars over the last few years without costing me a cent. I have dozens of websites churning away earning money, and they all run on PHP. (A classic LAMP stack, actually.)

      Feel free to rag on PHP to your heart's content, but coding in PHP has allowed me to work from home for years, do what I want, retire early, and enjoy my life....while you probably have to go into work and slave aw

    • It's worse than that -- all the non-programmers have moved to node!
    • This non-programmer of 20 some years makes 6 figures doing php. i learned c/c++ in college, wrote research and defense contracting apps in them, learned python and worked for companies everyone has heard of, etc. But PHP to my chagrin has been where the work was for me and ive had to keep doing it - but its one saving grace has been better and better strict options / hinting that help make better code. PHP is finally catching up.

  • by maop ( 309499 )
    I already switched to NodeJS because of the convenience of one language.
  • by Anonymous Coward on Saturday September 05, 2015 @08:58PM (#50464813)

    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.

    • by Anonymous Coward

      PHP has/had some genuine shitty misfeatures like register_globals, default error_reporting to the client, and magic_quotes.

      If you've been writing code long enough, you've probably forgotten the awful stuff you wrote as a kid.

      You become a great developer with years of experience and, in my opinion, treating it like engineering where you always keep in mind how to have the software fail safely; and treating it like people are *actively trying* to make your software break and covering your inputs and outputs a

    • Want to keep your skills 1337 and exclusive? You need a language with a predisposition to ideologically bureaucratic code and a ton of scaffolding that ensures even simple tasks take several days paid consultancy time. PHP is not for you, my insecure coding buddy.

      Want to get a new start-up to market rapidly without an enormous team? Choosing something simple that gets out of your way gives the best chance of success.

      Worried about the lack of strong typing causing bugs? Ask yourself this - how many productio

  • by EmperorOfCanada ( 1332175 ) on Sunday September 06, 2015 @12:42AM (#50465613)
    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.
    • by Anonymous Coward

      Interesting theory, what do you base it off of?

      Specifically, developing hhvm for academic pseudo cred so they can sit at the hipster's conference table. Almost nobody gives a shit about the languages you listed. (Well, I can see Go maybe getting traction...)

      In my opinion hiphop and hhvm were justified because php is so goddamn slow.

      • I have met many programmers who became religious about particular technologies. I know an electrical engineer who wants to pretty much set fire to the arduino factory. His argument is that the entire at family of controllers are for amateurs. He was royally pissed when I found one in a brand name toothbrush.

        Then you get XML people who think that JSON is basically satan's breath. Or Python 3.x people who think that Python 2.7 people should all be thrown into a pit. But PHP is about the least "academic" la
    • Facebook uses PHP so it's developers don't get really great job offers from other companies, as PHP pay doesn't generally go as high as pay for things like Java.

  • This endless PHP bashing is getting a bit sad. Sure, earlier versions of PHP did have some bad things, but with PHP 5 it's very easy to create solid applications. You still may not like PHP, that's fine. In that case the only wise thing to do is to choose something else. But for any badly written application in PHP 5 I'm 100% sure that the programmer is to blame, not the language. Yes, looking at all the other modern programming languages these days, that I think that's the case for all of them. But PHP 5 i

  • What happened to PHP 6.0? Are they skipping a version just to one-up Perl?

    • Re: (Score:2, Informative)

      by Anonymous Coward

      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, speci

  • Like any other language that suits his purpose - when well coded!

    I've been using PHP in web development for 10 years now and I can say it has very good features along with some flaws but, once again, just like any other language.

    People read "PHP" and think automatically in(secure) phpBB or Joomla but you can write your own PHP code/framework/project, you know. Just make sure if it fits your needs first before you say it doesn't do the job. Maybe you just chose the wrong set of tools for the job.


Any sufficiently advanced technology is indistinguishable from a rigged demo.