Slashdot Mirror


PHP Next Generation

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

7 of 213 comments (clear)

  1. Re:I got tired of waiting by philip.paradis · · Score: 5, Interesting

    I've mostly just stuck with Perl and Bash, and I'm still not sorry.

    --
    Write failed: Broken pipe
  2. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 5, Funny

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

  3. Re:If PHP was a horse in the prog language race by smittyoneeach · · Score: 5, Funny

    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.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  4. Re:What about PHP on the JVM? by baldass_newbie · · Score: 5, Funny

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

    --
    The opposite of progress is congress
  5. Re:I got tired of waiting by Stellian · · Score: 5, Insightful

    JS on the server is clearly big contender for PHP: it's great for quick and dirty prototyping, awful for large projects, and significantly faster than PHP.

    JS is the perfect recipe for language lock-in that's even stronger than PHP: front end developers already "know" it, they write a botched version of the backend code that 10 years later turns into an incomprehensible behemoth; any attempt to rewrite it will be rejected for "performance" reasons.

  6. Re:Reinventing the wheel by itsdapead · · Score: 5, Informative

    Why not use Node.js that has already got the wheel (JIT) rather than drilling holes in PHP to fit an axle?

    Because PHP also has a perfectly good chassis, body, roof, steering wheel, gear shift, seats, windows, instruments, cup holders, audio, fluffy dice etc. that you know how to use and don't want to throw away.

    People don't use PHP for the language (which is fugly), they use it because it has a huge collection of useful libraries, supported and well documented on the php.net site - and it is almost certainly available on your web hosting service.

    Not knocking Node.js, but it is still "getting there" as far as mature library support goes: yes, there are plenty of modules, but you're still more likely to find 4 diverse, half-written modules for a particular function than one complete, well-documented, future-proof choice.

    It can also be overly complex: Node's USP is asynchronous, event-driven programming, which is cool, but harder and overkill for many applications. Then there's the small matter of having to effectively roll your own web server for even the simplest dynamic web page (OK, you'll probably use a third party module - pick one and hope it stands the test of time, then learn how to configure it) and you'll still probably need a black belt in Apache to set up a reverse proxy to your app.

    Mind you, the great thing about Node vs. PHP is that nobody ever has anything bad to say about Javascript as a programming language </sarcasm>

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
  7. Re:I'd rather code COBOL or FORTRAN by JaredOfEuropa · · Score: 5, Insightful

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

    --
    If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...