Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



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 @05: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.
    • by jellomizer ( 103300 ) on Wednesday May 28, 2014 @08:13AM (#47106975)

      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: This is better then ASP but still it is clunky. But at least it is Java based so you are going by decent Java Rules.

      PHP: The language is rather inconsistent, a bad combings of many schools of thought... However it is easy to learn and implement, and it does its job.

      We have had some fads come and go, they weren't all bad and there are still some people still using them. But don't expect too much growth.

      Such as Ruby on Rails: You got a good language with a lot of good idea... However with rails all your apps look alike, and over time may seem outdated.

  • by monzie ( 729782 ) on Wednesday May 28, 2014 @05:32AM (#47106309) Homepage
    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.
  • by msobkow ( 48369 ) on Wednesday May 28, 2014 @05: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 @06: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 @09: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...
    • by Anonymous Coward on Wednesday May 28, 2014 @08:28AM (#47107073)

      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 the well and resulted in PHP's crappy reputation.

      On the other hand, that very friendliness is what made PHP so popular, but that in itself is a good thing: nowadays if you develop your application in PHP, you're pretty much guaranteed to be able to host it from any server you can think of.
      But as I said, PHP applications can be done well, you just have to be aware of your coding practices and enforce them on your team.

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Wednesday May 28, 2014 @06: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.

  • Comment removed (Score:2, Insightful)

    by account_deleted ( 4530225 ) on Wednesday May 28, 2014 @06:58AM (#47106633)
    Comment removed based on user account deletion
  • by LifesABeach ( 234436 ) on Wednesday May 28, 2014 @07:48AM (#47106835) Homepage
    How about Multi-Threading? I use to be able to do it, now I can't seem to get it to work?! :/
  • by account_deleted ( 4530225 ) on Wednesday May 28, 2014 @07:58AM (#47106887)
    Comment removed based on user account deletion
  • by Lisandro ( 799651 ) on Wednesday May 28, 2014 @10:54AM (#47108697)
  • by mu51c10rd ( 187182 ) on Wednesday May 28, 2014 @11:45AM (#47109419)

    I read the title and immediately envisioned Data hacking PHP code on the Enterprise...

  • by frank_adrian314159 ( 469671 ) on Wednesday May 28, 2014 @12:14PM (#47109739) Homepage

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

  • by Art3x ( 973401 ) on Wednesday May 28, 2014 @06:58PM (#47114403)

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

This is a good time to punt work.

Working...