Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
PHP Programming

PHP Next Generation 213

An anonymous reader writes "The PHP Group has put up a post about the future of PHP. They say, 'Over the last year, some research into the possibility of introducing JIT compilation capabilities to PHP has been conducted. During this research, the realization was made that in order to achieve optimal performance from PHP, some internal API's should be changed. This necessitated the birth of the phpng branch, initially authored by Dmitry Stogov, Xinchen Hui, and Nikita Popov. This branch does not include JIT capabilities, but rather seeks to solve those problems that prohibit the current, and any future implementation of a JIT capable executor achieving optimal performance by improving memory usage and cleaning up some core API's. By making these improvements, the phpng branch gives us a considerable performance gain in real world applications, for example a 20% increase in throughput for Wordpress. The door may well now be open for a JIT capable compiler that can perform as we expect, but it's necessary to say that these changes stand strong on their own, without requiring a JIT capable compiler in the future to validate them.'"
This discussion has been archived. No new comments can be posted.

PHP Next Generation

Comments Filter:
  • by Anonymous Coward on Wednesday May 28, 2014 @04:30AM (#47106303)

    It should have been shot in the paddock.

    Mind you at the other end of the spectrum we have the entry from academia "Haskell" that has already completed the course and is back in the stables. Unfortunately they haven't found a way to get it to interact with reality yet as that's an implementation issue.

    Feel free to add an analogy to your language pet hate below.

    • Now, in defense of PHP, I've been trying to compile Yesod, so that I can take it out for a spin. I update cabal, tell it to install, get enough compilation pages scrolling by to make GCC envious, and. . .it crashes.
      PHP at least lets me set up a web site and get hacked.
      • See, back when mod_perl was a newer thing, we were having the same discussions about it. PHP just keeps working. People can (and do) bitch about its shortcomings, but it still works.

        I am not a programmer by any stretch and even I have shaken my head at the way PHP does this or that over time, but that doesn't change its utility. It's very like perl in that regard, except it's actually useful for web development because it can be installed and web hosts provide it.

    • Well the real question what should replace it. I see so many PHP sucks comments but little response on what should replace it in terms of Web Development.

      In terms of big names where we can find additional developers if we need easily we got the following.
      ASP.NET: as actual ASP programming you are in a world of pain. But MS was nice enough to make an IDE that gives you other languages to code for it. But you are stuck on windows servers (Yes you have mono, but your code will be hit or miss)

      Java ServerPages:

      • by Bigbutt ( 65939 )

        Same thing I've said many times.

        "PHP Sucks! PHP Sucks! PHP Sucks!"

        Fine, PHP sucks. Tell me genius, what should I be using? Because until you can provide a viable replacement, I'm still going to use PHP. Hell, I use PHP to write scripts when I need to access the mysql database.

        [John]

  • A quick google search points me to one interesting project - "jphpcompiler" - https://github.com/jphp-compil... [github.com] . PHP on the JVM would be interesting. By leveraging existing Java and other libraries which run on the JVM ( by virtue of running on the JVM ) , PHP could be an interesting choice in Java and/or JVM based frameworks like Play ( Clojure ) or Grails ( Groovy ) or Spring MVC.
    • Re: (Score:2, Funny)

      by Anonymous Coward
      Yes, that's just what the world needs: the rigorous code quality of PHP combined with the high performance and lightweight Java Virtual Machine.

      Any chance you could throw some Haskell and M4 macros in there, too?
      • by baldass_newbie ( 136609 ) on Wednesday May 28, 2014 @05:21AM (#47106481) Homepage Journal

        "Yes, that's just what the world needs: the rigorous code quality of PHP combined with the high performance and lightweight Java Virtual Machine."

        Fortunately, I had already swallowed my coffee so the keyboard was safe.
        However, your point is valid. Just because you can theoretically run something on something doesn't mean it's a good idea.
        Anyway, I need to get back to writing a JVM in VBA. This is going to be the tits.

    • by Rufty ( 37223 )
      There's Quercus [caucho.com] a java implementation of PHP. Saw it, bookmarked it, never done anything with it.
  • by msobkow ( 48369 ) on Wednesday May 28, 2014 @04:47AM (#47106361) Homepage Journal

    I've had the misery of suffering with maintaining a few PHP applications over the years. It is, bar none, THE WORST LANGUAGE I have ever used. Even COBOL does a better job of handling the humungous amount of copy-paste code that PHP requires. Even FORTRAN does a better job of error checking before run-time.

    Sure, it's popular.

    So is McDonald's.

    That doesn't mean it's good or good for you.

    • by Anonymous Coward on Wednesday May 28, 2014 @05:05AM (#47106417)

      PHP is great when you need to deliver a working prototype yesterday and someone else will have to maintain the code.

      • by JaredOfEuropa ( 526365 ) on Wednesday May 28, 2014 @08:16AM (#47107525) Journal
        PHP is great for prototyping, throwaway scripts, or other quick & dirty stuff. But if any of that kind of code makes it into a critical production environment and turns it into a maintenance nightmare, blame the manager who allowed or ordered that, not the language.

        PHP can be used for production stuff as well, if you're careful. I was involved in building a mission critical system for a large corporation, and we selected PHP since the client already had a sizable pool of experienced PHP developers. We built the system relatively quickly and had little trouble handing it over to the team handling maintenance and enhancements, and it's been running happily ever since. What helped was applying good common coding sense, such as extensive error handling, and comprehensive unit testing against the documented functionality of each module / function. I've used far worse languages...
    • Re: (Score:2, Insightful)

      by Anonymous Coward

      I think that a lot of the criticism PHP gets is undeserved.
      If used correctly, PHP can be a very clean language. If you use the object-oriented facilities, it is as capable and clean as any other high-level language.

      The biggest problem with PHP is that it's also a very forgiving language, as in, it pretty much allows a novice programmer to get results quickly and easily with horrible, unmaintainable code.
      This is a double-edged sword, and since most programmers never evolve past novice status, it has polluted

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Wednesday May 28, 2014 @05:55AM (#47106611)

    Despite all hatred - and let's face it, PHP is a really strange phenomenon - this is why PHP continues to thrive. The PHP community gets from A to B by the most bizar reroutes across Z, Mary Poppins and f(x)=x^2e^x-2. PHP is a fractal of bad design [eev.ee], but they always seem to focus on the next issue that's simply in the way of getting the next real world job done. I've written a post on that a few weeks ago [slashdot.org].

    Them checking the performance of Wordpress (one of the large popular CMSes out there, with a really shitty architecture ... like most of its kind) as a benchmark for the foundation of a VM show how 'fast result' oriented the PHP community is. The idea itself of testing like this would seem insane to any serious developer, AFAICT.

    Point in case for PHPs insanity that always seems to work out in a strange way:
    I've fought it for over 12 years, but now I've finally given in and am working myself into Typo3, a big-league player in the world of PHP Web CMSes. Let me tell you: If you think Wordpress, Drupal or Joomla have an architecture that was designed by chimpansees (I should now, I've deployed Drupal and Joomla professionally and was on the Joomla Bugsquad), Typo3s has one that was designed by amobeas. With TypoScript - the T3 template and config language - they've got the textbook example of an inner platform (think PHP but non-turing complete for configuration and with magic numbers ... sort of like line-numbers, but not quite ... its really crazy ...). If PHP is a fractal of bad design, Typo3 classic is that ^2. It's very difficult to describe, you have to experience it for yourself to fully understand. It's like taking the red and the blue pill at the same time. Seriously.

    Anyway, I'm veering off. The point is:
    Knowing Typo3 is basically job security galore for any web developer in Germany. Period. I've agreed to dive into T3 and am right now scoring more than 60Ã an hour. Being able to edit templates in the CMS Admin area isn't bad either. ... Although TypoScript is one of the strangest things I've seen in my 28 years of computing, I have to admit. Think of Typo3 as the Vi and Emacs of CMSes, all rolled into one. Yet there are over 2000 official Typo3 agencies here in Germany. Being an online agency basically means being a Typo3 agency over here. What do you say, it's what people want. T3 is a household brand, it has an official association, a neat website and the vibe of "big, complicated and professional" all over it. The customers want it, and they're willing to pay for deployment in T3. Who am I to complain?

    PHP is bad, and nobody cares. Its barrier of entry is basically non-existant, security issues be damned, and they have a slew of pointy-clicky stuff for the peddlers to sell to end-customers. All for free. The most succesful FOSS projects are written in it and if the PHP crew are going to stick to their crazy "make it work, then make it beautiful" approach, it's probably going to stay that way for a long time.

    My 2 cents.

    • See the double post? You can thank beta for that. Mod this one down or turn it off if you are an editor, the one below is the final version.
      No more beta for me.

    • by wazzzup ( 172351 )

      Typo3 - good lord what an utter piece of crap and a UX nightmare. You hit it on the head with job security - that's why it's always been hard to use and always will be. And TypoScript. Words cannot describe the "why does this even exist?" cry from my soul every time I had to look at it.

      Part of the reason I quit my last job was because of Typo3. If I never see it again, it will be too soon.

  • Re: (Score:2, Insightful)

    Comment removed based on user account deletion
    • How large are your codebases then?
    • by Rufty ( 37223 )
      The trouble with PHP is that the barrier to entry is so low that I've had to support production sites written by code monkeys that didn't understand the for loop.
      • by narcc ( 412956 )

        How is that a problem?

        Why do think we have programming languages, if not to make writing programs easier?

        If a language makes writing code easier, that's a good thing. That's the entire point of using a high-level language.

  • How about Multi-Threading? I use to be able to do it, now I can't seem to get it to work?! :/
  • Comment removed based on user account deletion
  • I read the title and immediately envisioned Data hacking PHP code on the Enterprise...

  • ... it would be hard to make its APIs much worse.

  • Speed up PHP? It already runs in a fraction of a second. The database queries, meanwhile, can take many times longer.

Someday somebody has got to decide whether the typewriter is the machine, or the person who operates it.

Working...