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.

16 of 159 comments (clear)

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

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

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

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

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

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

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

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

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

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

  11. 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.
  12. 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...
  13. 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.
  14. 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.

  15. 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?