Slashdot Mirror


PHP 7.3 Performance Benchmarks Are Looking Good Days Ahead Of Its Release (phoronix.com)

PHP 7.3 RC6 was released earlier this week. Phoronix ran some benchmarks and compared the performance of v7.3 RC6 with releases going back to the v5.5 series. From the story: I ran some fresh benchmarks over the past day on PHP 5.5.38, PHP 5.6.38, PHP 7.0.32, PHP 7.1.24, PHP 7.2.12, and the PHP 7.3.0-RC6 test release. All of the PHP5/PHP7 builds were configured and built in the same manner. All tests happened from the same Dell PowerEdge R7425 dual EPYC server running Ubuntu 18.10 Linux.

Besides continuing to evolve the performance of PHP7, the PHP 7.3 release is also delivering on FFI (the Foreign Function Interface) to access functions / variables / data structures from the C language, a platform-independent manner for obtaining information on network interfaces, an is_countable() call, WebP support within GD's image create from string, updated SQLite support, improved PHP garbage collection performance, and many other enhancements. PHP 7.3 is just shy of 10% faster than PHP 7.2 in the popular PHPBench. PHP 7.3 is 31% faster than PHP 7.0 or nearly 3x the speed of PHP5.

91 comments

  1. No one in his right mind uses PHP these days by ShanghaiBiII · · Score: 0

    I beg to differ. I ran my own benchmarks days ago, and performance was lackluster at best.

    1. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      What would you use to build an API then?

    2. Re: No one in his right mind uses PHP these days by Hadlock · · Score: 1, Informative

      Python, Go, RoR 5, in that order

      --
      moox. for a new generation.
    3. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 1

      Python? Never used it for web backend, but wouldn't it make more sense to use something thats been developed for exactly that purpose for 25 years? i.e. PHP

    4. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      Not necessarily. It's a good idea iff its model of "one jumble of code per page" is just the thing you need and you don't mind the quirks and other joys that come with a one-trick-pony cooked up by highschool students, thereabouts. It's the visual basic of "web": You can make it do *something* with little effort but --if you are an experienced programmer-- a lot of frustration working around the senseless quirks and gratuitous gotchas. If you don't know any better then you won't care about the quirks, of course. Building something larger, well, if you're an experienced programmer you can write your own scaffolding and once that's done you have much better tooling and will get much more work done in far less time.

      So if you are a programming dwarf and like to stand on the shoulders of dwarves, then yes. If not and you're not, then no.

    5. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 2

      As a programmer you need to be able to speak the most popular language of the web which is PHP. But, that doesnâ(TM)t mean you only need to use PHP. Just have an understanding of atleast 3 to 4 major languages and decide which one to use based the task you are trying to accomplish. Personally, I donâ(TM)t use Python for basic website with a backend. With both Flask and Django around I donâ(TM)t think python is a good programming language to use when it comes to web development . And on the other side I donâ(TM)t use PHP for ML application because Python does that way better than any other languages .

    6. Re: No one in his right mind uses PHP these days by slashdice · · Score: 1

      PHP was designed for the 1993 era web. If you're still developing 1993-era web pages, stick with PHP.

      If you have an html page and want to add some dynamic text, it's great. That's what it's optimized for. Rewriting something that's mostly static text with RoR or node or whatever is stupid.

      OP asked about an API. Maybe something CRUD like (GET /anonymous_coward/posts to return a json array). Well, PHP can do it (possibly abusing 404 errors, possibly with apache/nginx URL rewriting. But it's going to be ugly and it's not what PHP was made for. Plenty of general purpose programming languages have routing libraries/frameworks that were made for that.

      --
      Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
    7. Re: No one in his right mind uses PHP these days by K.+S.+Kyosuke · · Score: 1

      PHP has been developed for web APIs? Wasn't it developed to serve dynamic web pages?

      --
      Ezekiel 23:20
    8. Re: No one in his right mind uses PHP these days by dbrueck · · Score: 1

      As a programmer you need to be able to speak the most popular language of the web which is PHP

      No, you don't.

    9. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      the most popular language of the web which is PHP

      Hahahah what?

    10. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      If your idea of PHP is the spaghetti mess WordPress is then, yeah, nobody in their right mind does that. Don't conflate the script kiddies who make WordPress with actual developers. WordPress is a running joke between real PHP developers. Don't confuse WordPress for PHP any more than you would McDonald's for the culinary arts.

    11. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      Actually, it *is* what PHP is made for since version 4. Good grief, man, where have you been the last 18 years? Hiding under a rock?!

      To the point, PHP microservices with URL rewriting are extremely fast when you use NginX and FastCGI. As for routing libraries, just head over to Packagist.org to see how many there are (of varying quality) or stick with a reputable framework such as Symfony.

      Your lack of knowledge about what you're talking is not an excuse for rejecting reality and substituting your own. It only shows those of us who actually use both PHP and some of the other language you mentioned that you are misinformed, stubborn and I'd definitely avoid working with you in any project because your absolutism would drag us down.

    12. Re: No one in his right mind uses PHP these days by Anonymous Coward · · Score: 0

      To be fair, with the large adoption and age of the project it's hard, if not impossible, to clean this up. Whilst WP core is a political mess, projects like WooCommerce show theres decent projects in the ecosystem and I would even go as far as saying it being the best ecommerce project to date.

  2. PHP in a good language by gustavojralves · · Score: 5, Insightful

    Besides the critics, PHP is mature, well maintaned, has a good interaction with C and is easy to program.

    1. Re:PHP in a good language by Anonymous Coward · · Score: 1, Interesting

      Who cares? It is convenient and flexible, it offers a lot of control and it works well.

    2. Re:PHP in a good language by Anonymous Coward · · Score: 3, Insightful

      That is one person's opinion from 7 years ago. PHP has advanced a bit since then.

      Way to be dishonest though.

    3. Re:PHP in a good language by Joce640k · · Score: 2

      Which parts of that are no longer applicable?

      --
      No sig today...
    4. Re:PHP in a good language by Anonymous Coward · · Score: 0

      It has variables, if/else and for loops, what else do you need?

      The author of that post is making gameboy game about their cat, and seemingly also loves to draw explicit rabbit porn. Getting a tiny rabbit double penetrated anally by two giant penises was enough for me to realize that he person can clearly draw very well, but what they're drawing isn't for me. It doesn't matter what tools they use, if it was more high-res and colorful I would like it *less*.

      So, all the stuff that's written in "not-PHP".... most of that is shit, too. Another static site generator, or note taking app, and all that inane, boring shit, with 15 installation steps for a huge, bloated nothing. And IF someone manages to make something that's not just the same shit using technology X and Y, what are they using it for? Furry porn and articles that get linked to "end the discussion" on PHP years later, like a racist would use a slur to make their case?

      Pffff.

      Take that 3D editor on your homepage. I see that and think "cool, someone made their own little 3D editor". Maybe it's not little, but let's just for the sake of argument assume my first impression is right, that it's a 3D editor that will never be Blender. So? It still has exactly the functions you need, and probably produces output that can be used in other programs. The world isn't harmed by this existing, I'm not going to freak out and say new 3D artists should never use your tool, but instead learn something tried and true. 99% of the assets created in any tool will be used for bullshit anyway, so who cares, right?

      The only reason for "hating" PHP I could see is a.) knowing only PHP, in that case learn something else b.) being forced to maintain shitty PHP, in that case either grow some balls and go ninja on technical debt, just outright don't do what they tell you to do, do what you know is correct -- if you get fired, get a better job. But if you end up outright stuck for good in such a situation and can't even find any funny side of it, at all, then that's your fault. You'd be bitter elsewhere, too, it has nothing to do with PHP or any other language. Javascript has incredible warts, too, as do many languages, but if you know about them, you know what you can build, and then you build it. If you constantly "run into" problems you are doing it wrong or simply bit off more than you can chew.

      As the saying goes, a clown blames his rubber hammer -- a craftsman uses the rubber hammer to make oranges perfectly round, annoy people by pretending everything is a court room and they're the judge asking for order, or as a door stop.

    5. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Yeah, right.

      Wasn't PHP 5 that shipped with broken unit tests?

    6. Re:PHP in a good language by Anonymous Coward · · Score: 0

      You think that's bad? C++ was designed by committee!

    7. Re: PHP in a good language by Anonymous Coward · · Score: 0

      PHP isnâ(TM)t Java but like any language itâ(TM)s the best choice for some uses sometimes.

    8. Re:PHP in a good language by Anonymous Coward · · Score: 0

      That broke my sarcasm meter. I can't tell whether that was sarcasm or not...

    9. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Can we stop comparing PHP to other crap languages like Javascript and C++? What low aspirations.

      How about setting our goal to be as good as a GOOD language like Python, Haskell, Rust, ... even Java.

    10. Re:PHP in a good language by 110010001000 · · Score: 3, Insightful

      Virtually everything used to post your comment, from your local computer to the network to the server, was written in C++.

    11. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Loved that ee post at the time. However, to be fair, most of it is untrue as of today.

    12. Re:PHP in a good language by Anonymous Coward · · Score: 1

      And a big trunk of Perl (not mentioned above)!

    13. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Again, which parts are untrue today? The language hasn't fundamentally changed.

    14. Re:PHP in a good language by Anonymous Coward · · Score: 0

      I've yet to see any version of PHP that doesn't ship with broken unit tests (expected to fail) - date handling especially used to be "here be dragons" in PHP 5.

    15. Re:PHP in a good language by angel'o'sphere · · Score: 1

      Well, you could argue: as literally everything except his PC and perhaps yours uses a kernel written in C ....

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    16. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Python, Rust and Java are not good languages.

    17. Re:PHP in a good language by Anonymous Coward · · Score: 0

      I doubt it. Most of it is probably C.

    18. Re:PHP in a good language by Joce640k · · Score: 2

      Yep, no clear answers yet.

      PHP 7 deprecated some more functions, broke a few things, added the spaceship operator, but apart from that it's basically the same. That page still applies.

      http://php.net/manual/en/migra...

      --
      No sig today...
    19. Re:PHP in a good language by Anonymous Coward · · Score: 0

      A good language is one that you get paid to use.

    20. Re:PHP in a good language by Joce640k · · Score: 1

      Nobody's saying it can't be used.

      The problem is the massive number of gotchas and little details you need to remember to be able to use it effectively. It's madness.

      --
      No sig today...
    21. Re: PHP in a good language by Anonymous Coward · · Score: 0

      market share drastically shows the opposite of your post.

      RoR remains below a few % at its best time. Python revival due to ML and data. Move on, nothing to argue about. Haters gonna hate.

    22. Re: PHP in a good language by batukhan · · Score: 2

      It seems to me most cotchas appear in legacy functions. New features are actually modern and well designed.

    23. Re:PHP in a good language by Anonymous Coward · · Score: 0

      Such as?

    24. Re:PHP in a good language by Joce640k · · Score: 0

      Such as?

      All the ways that ordinary comparison operators can do things you didn't expect.

      The randomness of underlines in the function names.

      etc.

      --
      No sig today...
    25. Re: PHP in a good language by Joce640k · · Score: 2

      I don't even know what you're trying to say.

      Is the market share of something unspecified relevant to whether PHP 7 has fixed PHP or not?

      --
      No sig today...
    26. Re:PHP in a good language by Anonymous Coward · · Score: 0

      uh, actually the kernel is C (yes, even iApple and Windoz).
      Nothing of any value was / is ever written in C++.

      CAP === 'benzene'

    27. Re:PHP in a good language by Anonymous Coward · · Score: 1

      All the ways that ordinary comparison operators can do things you didn't expect.

      PHP's comparison operators aren't that complicated, really, and they are well documented. I have never had any actual problems with them.

      The randomness of underlines in the function names.

      There may be lots of theoretical arguments why the naming of functions in PHP is inconsistent and how that violates some principle, but it is not a problem when you are actually using PHP. It has no impact on usability whatsoever.

    28. Re:PHP in a good language by Anonymous Coward · · Score: 0

      In Korea, only old people use PHP.

    29. Re:PHP in a good language by gman003 · · Score: 2

      A lot of those are things that are technically still in the language, but there are far better ways to do them now.

      For instance, mysql_real_escape_string() was always a hack. The actual solution was proper placeholder syntax, which to be fair MySQL didn't support at the time even in its C API. We got that (in I think PHP5) with PDO, which is also database-agnostic.

      The lack of type hinting in function return types was added (I think PHP7?).

      Others are things that are clearly the result of the article author being a low-level programmer, and not understanding high-level language concepts.

      The lack of parallel programming is because it's designed as a web server scripting language. You extract parallelism by having multiple requests from multiple users, not from running each request multithreaded. And given just how complicated multithreading is, and how incredibly hard it is to get right, it's just not worth it. Making a good programming language is as much about what you leave out as add in. (and if you 100% need multithreading, there's a library mentioned *later in that article* to do so)

      The "redundant" syntax for blocks ("if (){ ... }" and "if: ... endif;") is actually quite useful. In big chunks of procedural code, curly braces are far more readable, but in code intermingled with HTML output, "endif" and cousins do a better job of telling you what block just closed.

      The author seems to completely misunderstand what weak typing *is*. He knows about type hints in function parameters, but complains that you can pass a string with a numeric value to a function calling for an int, and it will just be converted to an int instead of throwing an error. Why is that an error? In C-like languages it's an error because the variable has machine-level type that's fixed throughout its lifetime, but in weakly-typed languages, if you can convert it into an int, it *is* an int.

      In his complaints about E_STRICT, he mentions "using a variable as a function name". Which, if I understand what he's referring to right, is again a feature. You can use a variable to get a function name - "$foo()" will take the string value of $foo, and look for a function with that name. I've done pseudo-polymorphism this way.

    30. Re: PHP in a good language by Anonymous Coward · · Score: 0

      I agree that there are some serious quirks with php. But I get get tired of all the php and C haters claiming that python or Ruby/rails or some other even crappier language they are a fanboy of is better. I also get tired of rails and python code that doesn't check for or handle any edge cases or error conditions because "clean." My php and C code may not be quite as pretty, but it usually works better and requires less fixing and maintenance than the crap written by millennials in their favorite fad language and framework.

    31. Re:PHP in a good language by K.+S.+Kyosuke · · Score: 2

      Virtually everything used to post your comment, from your local computer to the network to the server, was written in C++.

      The browser, perhaps. Perl, httpd, the Linux kernel, those are in C.

      --
      Ezekiel 23:20
    32. Re: PHP in a good language by cleftic101 · · Score: 1

      This is very true... I run a website http://mp3cwitch.com.ng/ and it runs well on phpbb... Very easy to use too

    33. Re:PHP in a good language by tepples · · Score: 3, Interesting

      I tried to come up with a more balanced view on PHP, synthesizing Eevee's popular "fractal" essay, ManiacDan's "hardly" rebuttal, and Douglas Crockford's JavaScript: The Good Parts, to form coding standards and things that are still broken.

    34. Re:PHP in a good language by tepples · · Score: 2

      For instance, mysql_real_escape_string() was always a hack. The actual solution was proper placeholder syntax [...] We got that (in I think PHP5) with PDO, which is also database-agnostic.

      Even PDO doesn't support passing an array as a parameter for, say, the right side of SQL operator IN. Sometimes it can be easier to make a loop that does $db->quote() and then always use that loop for IN than to generate a string of question marks of the appropriate length and ensure that the parameters before the list, the parameters in the list, and the parameters after the list are always bound in the same order.

      The lack of parallel programming is because it's designed as a web server scripting language. You extract parallelism by having multiple requests from multiple users

      Which doesn't help if you happen to have only one user, or a small number of users one at a time, doing relatively heavyweight queries. You might end up doing cURL on localhost to spawn a bunch of subprocesses.

      in weakly-typed languages, if you can convert it into an int, it *is* an int.

      A numeric string in PHP behaves like an int in some contexts but not in others. This inconsistency leads people like her* to prefer languages that use strong dynamic typing, such as Python.

      "using a variable as a function name". Which, if I understand what he's referring to right, is again a feature. You can use a variable to get a function name - "$foo()" will take the string value of $foo, and look for a function with that name. I've done pseudo-polymorphism this way.

      As have I. But the messy part is that references to functions are stored as strings as opposed to being some other specialized type, as in C (function pointers), Python (callable objects), and C++ (both of the above). In addition, prior to PHP 7, it was impossible to catch a call to a missing function as an exception; programs had to use the look before you leap (LBYL) anti-pattern.

      * Eevee's name is Evelyn according to her Twitter account. I know her from a Discord server about Game Boy development.

    35. Re:PHP in a good language by wimg · · Score: 2

      A LOT of things mentioned on that page have changed. Which parts ? To name just 5 :
      - PHP is naturally tied to Apache - no it isn't. There's PHP-FPM, there's Nginx Unit, it even works on IIS.
      - php.ini applies to every PHP application run anywhere - there is a main php.ini but you can override this anywhere you want and in any webserver
      - Similarly, there is no easy way to “insulate” a PHP application and its dependencies from the rest of a system. Running two applications that require different versions of a library, or even PHP itself? Start by building a second copy of Apache - couldn't be more wrong. It's in fact very easy to run multiple PHP versions next to eachother.
      - PHP basically runs as CGI. Every time a page is hit, PHP recompiles the whole thing before executing it. Even dev servers for Python toy frameworks don’t act like this - PHP opcache has been part of core for many years
      - No coherent deployment mechanism - plenty of solutions exist, depending on your toolset

      Nobody says PHP is perfect, but neither are other languages. They all have quirks. But pointing to documents from 2012 is kinda ridiculous...

    36. Re:PHP in a good language by gman003 · · Score: 2

      Even PDO doesn't support passing an array as a parameter for, say, the right side of SQL operator IN. Sometimes it can be easier to make a loop that does $db->quote() and then always use that loop for IN than to generate a string of question marks of the appropriate length and ensure that the parameters before the list, the parameters in the list, and the parameters after the list are always bound in the same order.

      Yeah, that is mildly annoying, but that's a pretty niche feature missing. I've wanted it maybe a half-dozen times in my career. (And I think it's a limitation of the underlying C APIs as well?)

      Which doesn't help if you happen to have only one user, or a small number of users one at a time, doing relatively heavyweight queries. You might end up doing cURL on localhost to spawn a bunch of subprocesses.

      If you *need* to spawn subprocesses, there is a module for it. It's not something 99% of users ever need to do, and is usually a sign that you're either using the wrong language entirely, or are architecting things completely ass-backwards.

      Language design, as I said, is as much about choosing what features to leave out as it is what features to add. PHP has very, very limited multiprocessing support. But C has no eval() function, and anyone asking for it would rightly be asked what the hell they were thinking. Likewise, I think it's fair to say anyone looking for top-notch multiprocessing support in PHP is doing something at least a little fucky. I've done it myself, once or twice, but it was always something PHP was not meant to do.

      A numeric string in PHP behaves like an int in some contexts but not in others. This inconsistency leads people like her* to prefer languages that use strong dynamic typing, such as Python.

      Preference is fine, but she is declaring a language fundamentally flawed because it doesn't match her personal preference.

      Now, it is a valid complaint that PHP will often make counterintuitive or even lossy conversions, with barely a notice logged. Were I to design a PHP replacement language, I would certainly make it so that only lossless conversions can happen implicitly (eg. string "0.0" can convert to float 0.0 but not int 0). But that is still a matter of preference, and PHP's "let's try to make it work" philosophy is at least consistent here.

      As have I. But the messy part is that references to functions are stored as strings as opposed to being some other specialized type, as in C (function pointers), Python (callable objects), and C++ (both of the above). In addition, prior to PHP 7, it was impossible to catch a call to a missing function as an exception; programs had to use the look before you leap (LBYL) anti-pattern.

      On the other hand, using it as a string allows some rather useful tricks. Like that pseudo-polymorphism thing I mentioned - I was writing a report generator, and needed three functions implemented for every report type. I *could* have just written one function, and made a giant switch statement for the two-dozen report types, or I could have shoehorned them into classes and objects... but instead I just set up a naming convention, and did some string concatenation to get the right function names.

      * Eevee's name is Evelyn according to her Twitter account. I know her from a Discord server about Game Boy development.

      Noted, thanks.

    37. Re: PHP in a good language by Anonymous Coward · · Score: 0

      You seem to be glossing over the fact that 7.1, 7.2 and now 7.3 introduced more drastic changes.

      http://php.net/manual/en/migration71.php
      http://php.net/manual/en/migration72.php

      7.3 migration guide will be released on official 7.3 release.

      Not to mention the hundreds of changes in point releases between major releases.

    38. Re: PHP in a good language by Anonymous Coward · · Score: 0

      Why do you even couple C and PHP? C is a great language. PHP is not. Don't be fooled and assume that just because they existed side by side for some time, they belong together. They don't!

    39. Re:PHP in a good language by Joce640k · · Score: 1

      Once more, for the reading impaired: Nobody's saying it can't be used.

      The claim is: It was "designed by clowns".

      --
      No sig today...
  3. Fastest security bugs on the planet by Anonymous Coward · · Score: 0

    Don't waste CPU cycles before you get owned. Use the new and improved PHP 7.3. Your neighbor's kid approves.

    1. Re:Fastest security bugs on the planet by Joce640k · · Score: 0

      These day "increased performance" just means the developers will care about optimization even less than before.

      The apps will bloat to absorb any difference within a couple of months.

      --
      No sig today...
    2. Re:Fastest security bugs on the planet by Sique · · Score: 1
      If a comment starts with "these days", it is usually a rant which has nothing to do with "these days".

      To the contrary: Since the advent of time, increasing speed of a base process made other non-speed-optimized processes based on it feasible, leaving room for other developments.

      --
      .sig: Sique *sigh*
    3. Re:Fastest security bugs on the planet by Anonymous Coward · · Score: 0

      Exactly. Server farming is a business where efficacy is more important than efficiency, but the underlying improvements in the PHP platform also enable less resource intensive acquisition of server credentials.

  4. last/next 'big thing' the same? by Anonymous Coward · · Score: 0

    era of open honest communications & commerce still possible.. cease fire stand down there are mothers & children in every last town..

  5. Re: Why the constant focus on "performance"? by batukhan · · Score: 4, Informative

    Working on horrendous legacy code, we did a whole system rewrite and saw our server costs cut in half. Our main expenses are staff wages and server costs. Performance is a real issue.

  6. Re:Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    Performance may not necessarily be a problem in all applications of PHP, but better performance is always an improvement.

  7. You have a point there. by Qbertino · · Score: 1

    Disclaimer: Professional PHP dev here.

    One of the things really annoying about PHP is that it's so n00b friendly you run across tons of crap code. The upside is that PHP is quite hilarious. There's not a week that goes by that doesn't have me laugh out load about some quirky thing PHP had up its sleeve.

    The truth is also that PHP is so domain specific that it really gets SSI programming done better than any other solution out there.

    PHPs badness is its advantage.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:You have a point there. by colfer · · Score: 3, Informative

      The session-handling has been a strong point from the beginning, or so I've read. It's certainly easy to use. I'd rather write in Perl or another language, but for web stuff PHP has the win. Despite all the crazy functions, it's solid. Upgrading is easy, modules all fit. Still some fatal errors that should be warnings.

  8. Re: Why the constant focus on "performance"? by Hadlock · · Score: 2

    I'm sure Facebook, arguably the largest PHP user on the web, would disagree with not needing more performance. An extra 1-2% performance bump is equivalent to getting an extra year of use out of compute resources they already own and have received a tax benefit from depreciation. It's million of dollars of free money.

    --
    moox. for a new generation.
  9. Re:Secure your PHP setup & here's how... apk by Anonymous Coward · · Score: 1

    But has it been rewritten to use the new and improved PHP?

  10. real world performance by Anonymous Coward · · Score: 0

    This must only optimize poorly written code. I can't believe that well-writen code would run any faster. If there is 3x performance gain on well written code that would have to mean the performance before was abysmal.

  11. And the hacker are cracking it now by Anonymous Coward · · Score: 0

    See it already 0-dayed.

  12. Re: Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    FB gets a lot from PHP, but do the contribute to the project, in return?

  13. Re: Why the constant focus on "performance"? by Lennie · · Score: 1

    Isn't Facebook using HHVM ?

    --
    New things are always on the horizon
  14. Re: Why the constant focus on "performance"? by Lennie · · Score: 1

    My guess is Facebook uses HHVM, but a quick look around on the web didn't tell me how that related to normal PHP.

    --
    New things are always on the horizon
  15. Re: Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    PHP 7.2 is basically on par HHVM.

  16. Re: Why the constant focus on "performance"? by drinkypoo · · Score: 4, Interesting

    While this all makes sense, my problem with PHP ain't CPU burn, it's memory usage. What I need from my PHP CMS is for it to use less RAM, not for it to use less CPU. CPU is cheap, RAM ain't.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  17. Dunning-Kruger says it wasn't. by Anonymous Coward · · Score: 0

    Most people aren't above-average. PHP is a "programming" "language" "designed" and "implemented" by such people, predominantly used by such people, and popular with such people, but that's as far as that goes. If you take its domain sufficiently narrow, it's the best there is. In the "the best windows ever!" sense: Don't ever compare it to a real OS. But if your view is but a teensy bit larger, the thing inevitably falls down on its face and can't get up.

    It's the windows of programming languages. Many people have worked really hard at making that pig fly to the point that you might call the result "mature" and "well-maintained". But no matter what they do, there's no changing the basic nature of the thing.

  18. Sad day for us all by Anonymous Coward · · Score: 0, Offtopic

    I guess APK couldn't take the onslaught from me, "Lord of Posts"!

    ZIP

  19. Sure? then try this? by Anonymous Coward · · Score: 0

    Just make a new line in your code, with a single random word on it.
    Run the script. Notice there is no error message.
    Why not?
    Because strings that PHP does not recognize as identifiers, are considered string literals!
    And hence expressions. Which have return values.
    And by default, unused return values are silently ignored.

    If that doesn't make your neck hairs stand up, and raises all the red flags, you're not a programmer. You you just dabbled with some scripts. Sorry.

    Of course, like in any "duck typing" language with implicit casting, that's a dangerous swamp of traps too. Made even worse by the value VS reference passing fuck-up.

    And there's so much shit tacked-on later in a shitty way that clearly does not fit the original skeleton. Even the class system.

    Its library is horrid too. It has the same disease as the Apple "store". There's an app/function for everything! Meaning there's a function for every possible combination of functionality! Instead of either one universal function, or just its base functions for individual combination.
    But wait, there's more functions! Non-buggy versions of still existing buggy functions! (Like that whole escaping debacle.)

    Sorry, PHP is shit. And if you keep clinging to it, and keep ignoring those problems, instead of working in some better designed an more advanced languages, you will never progress in your skill level, and stay a low-level botcher for the rest of your life. (Please don't.)

  20. "Argument from popularity" fallacy. by Anonymous Coward · · Score: 0

    Justin Bieber is/was the most popular music video.
    Trump was voted into office.
    Need I continue?

    I'd say popularity is unrelated to quality. But I suspect it is related... inversely proportionally!

    Why are you arguing on the level of a child anyway? Isn't that fallacy taught in primary school already, nowadays?

  21. Re:Secure your PHP setup & here's how... apk by slashdice · · Score: 1

    No, it uses Delphi which was an early language by Anders Heidlburger. He threw it away and started over with a little language known as Node.JS.

    --
    Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
  22. Re: Why the constant focus on "performance"? by slashdice · · Score: 1

    Facebook uses Hack. Originally, Hack was a PHP superset with types and some other extensions and better performance. In theory, PHP code could run under the Hack/HHVM interpreter/runtime without modifications. Around the time of PHP 7, Hack went their own way and is no longer a superset of PHP.

    Prior to Hack/HHVM, they also tried HipHop, which transpiled PHP to C which was then compiled.

    --
    Copyright (c) 1990 - 2014 Dice. All rights reserved. Use of this comment is subject to certain Terms and Conditions.
  23. IMPERSONATING ME AGAIN? apk by Anonymous Coward · · Score: 0

    I've no version 3.0++ & gweihir KNOWS u IMPERSONATE me https://it.slashdot.org/commen... c6gunner proves it https://linux.slashdot.org/com... he forgot to SUBMIT as AC & using his registered 'lusrname' instead (because he tried to mock me both BEFORE & after I FAIRLY challenged him to show he's done better work - he had ZERO).

    & NO WAY I'd "cry" like you "playing victim ne'er-do-wells" on /. (TROLL /.ers, not all) OR post on hosts offtopic.

    YOU HELPED ME https://science.slashdot.org/c... (& you quit trying to make me look bad trying to "tell lies" on hosts as "ME" IN YOUR IMPERSONATIONS of me e.g. https://tech.slashdot.org/comm... as regards Intel speculative execution attack? Hosts PREVENT 'EM)

    APK

    P.S.=> I KNOW the 2nd to last link above's KILLING YOU - YOU ACTUALLY HELPED ME getting me to see if hosts stop more than portsmash (& Meltdown + Spectre too) & "lo & behold" - hosts WORK on 'em - U LOSE... apk

  24. Re: Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    PHP has always had types, though

  25. Re:Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    Well, you did say you're a PHP user, so...

  26. Re: Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    CPU isn't cheap. We lose 10% because intel cheated. Spectre and Metldown slow are stuff down. Any bump they get is making up for spectre.

    I agree that memory footprint needs tuning as well. However, that is just as much about bad design patterns in PHP.

  27. Re: Why the constant focus on "performance"? by mpol · · Score: 1

    Memory is only used during a request. When a request is done, you get your free memory back. When a request is dealt with faster, you get more free memory in total (or you can handle more requests).

    --

    Well, don't worry about that. We can get you back before you leave. (Dr. Who)
  28. Re: Why the constant focus on "performance"? by drinkypoo · · Score: 1

    So what? I'm not waiting on PHP, ever. I'm waiting on the network or the database, and making PHP faster won't appreciably affect execution time.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  29. Re: Why the constant focus on "performance"? by mpol · · Score: 1

    So what? So wat?
    Are you from Murica? :)
    I thought Dutch people were rude, but muricans on slashdot are quite something too.

    --

    Well, don't worry about that. We can get you back before you leave. (Dr. Who)
  30. Re: Why the constant focus on "performance"? by Anonymous Coward · · Score: 0

    Despite HHVM team saying that they do not intend to be compatible with PHP7 and will now officially only support Hack?