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 @05:23AM (#47106277)

    And moved to Python instead.

  • 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 narcc ( 412956 ) on Wednesday May 28, 2014 @06:19AM (#47106473) Journal

    From inconsistent to consistent

    You're talking about Python, right? It may be a lot of things, but consistent isn't one of them.

    From difficult to scale to easy to scale.

    Again, Python? Also, I wasn't aware that PHP was "difficult to scale". No one else seems to have trouble with it. Well, "double-digit percentage of total internet traffic" sites excepted, of course. Though at that point, just about everything is "difficult to scale".

    From crappy web frameworks to excellent web frameworks

    I've never seen a "web framework" I'd classify as "good", let alone "excellent".

    I'm still floored by the Python recommendation. This is a language that couldn't even get a simple print function right until version 3. A language so fundamentally flawed that the syntax can't adequately handle its features (anonymous functions, for example). A language known for abysmal performance. A language that can't even maintain compatibility between minor versions.

    You want people to invest in that? That's just crazy.

  • by narcc ( 412956 ) on Wednesday May 28, 2014 @06:27AM (#47106503) Journal

    Still waiting for at least a half-decent argument that it "sucks". (I've seen the fractal article, and then I fact-checked it. Guess what I think about it now?) It seems uniquely well suited to its niche, and more than capable. More than 80% of websites seem to agree. You don't get that kind of market penetration by being "virtually unusable" like the Slashdot hive-mind seems to believe.

    Who knows, maybe it does "suck" -- it just happens to suck significantly less than all the alternatives.

  • by Stellian ( 673475 ) on Wednesday May 28, 2014 @06:55AM (#47106613)

    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.

  • 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 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 caseih ( 160668 ) on Wednesday May 28, 2014 @09:00AM (#47107381)

    Yes I have used Python, actually. and I've found the same thing ESR discovered about it years ago. Python promotes rapid development with fewer errors than many other languages. And it's generally clean and extremely easy to read. Python has its warts of course. And gotchas. PHP has its good points and bad points as well. But to try to disparage Python just to make your point that PHP is great is pretty silly. If PHP is great it should stand on its own regardless of your personal language preferences. And I think it can. That's not to say, of course, that PHP does not have many problems as a language; it does.

  • 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 Xest ( 935314 ) on Wednesday May 28, 2014 @10:37AM (#47108469)

    The problem with everything you say, every comment you make on PHP and Javascript is that it goes along the lines of:

    "Still waiting for at least a half-decent argument that it "sucks". (I've seen the fractal article, and then I fact-checked it. Guess what I think about it now?)"

    Please elaborate. Tell us what you found not to be true in that article, tell us what your fact checking discovered. Don't just say "I fact-checked it" and then that obviously means it wrong. Guess what you think about it now? I've no idea given that you've never ever managed to counter it at all, are you perhaps thinking "Fuck it's right, but I can't rebut it, so I'll just pretend it's wrong"? Did I guess right?

    "More than 80% of websites seem to agree."

    Where is the evidence? Even if true what proportion of major players use PHP? Very few serious players who have to maximise stability, performance and security do - Twitter? Nope, Google? Nope, eBay? Nope, Amazon? Nope, Slashdot? Nope, BBC? Nope, Microsoft's sites? Nope, Apple? Nope, YouTube? Nope, Blogger? Nope, LinkeIn? Nope. Facebook goes near it but even they've been translating it to C++, or trying to convert it into Java with a JIT for the last 5 years. Other than that there's what, Wikipedia and Yahoo? Fact is in major sites even Python has more of a showing than PHP. Even if PHP is used in more sites, it's used in less serious sites that actually matter so sure PHP may be prolific in first time or throw away sites, but if you're doing anything as a business, if you're doing anything where you want security, stability, and performance, then PHP is not a viable option. You don't find PHP in banking or most of the major eCommerce sites for example, it's Java for the most part.

    Look, I'm not saying you're wrong about PHP, but you're infuriating to have this discussion with because no matter how hard I or anyone else tries you just never back up your claims. You just make comments like "There's nothing wrong with PHP", "The fractal article is nearly all wrong", but you can never prove it, you can never elaborate, you can never expand on it. I can't tell if you're a shill or a troll, I find it hard to believe you're anything else for the simple fact that you're so utterly evasive in justifying your arguments.

    The "PHP is a fractal of bad design" article is a long well argued piece on PHP. If you want to have it declared wrong you similarly need to take at least some time to tear it apart. Simply saying something is wrong doesn't make it so, you have to explain why and how it is wrong.

    Until you can start backing up your claims, one can only assume you're simply full of shit - a troll, a shill, a fanboy, whatever. You need to start justifying your claims - those criticising PHP have done so time and time again, and many just point to fractal precisely because it saves them having to repeat those already well established points. I've yet to see anything that can counter it, the best I attempt I saw was this forum rebuttal:

    http://forums.devshed.com/php-... [devshed.com]

    The problem is, the author of it only manages to demonstrate how little he knows about software and programming, rather than demonstrating that article he's disputing is wrong in many, or even any ways. I would love to have my knowledge expanded by being informed as to the many ways in which fractal is wrong but all those of you that claim to have this knowledge seem unwilling to provide it, is there some curse on it? will the world end if you tell us why fractal is wrong or something?

    Long story short, less fanboy, more facts please, and if you're not willing to start arguing your case with facts then stfu because I'm sick of seeing PHP articles flooded with unsubstantiated fanboy nonsense. You're like the annoying religious guy who argues that god exists just because he does and that's all there is to it, you can't justify the claim, you can't explain why, but you've decided in your head he's real without any justification so that's it he absolutely must be.

  • by i_ate_god ( 899684 ) on Wednesday May 28, 2014 @10:45AM (#47108589)

    > You're talking about Python, right? It may be a lot of things, but consistent isn't one of them.

    Python's inconsistencies are bizarre enough that they become easy to remember, and there aren't that many. PHP's inconsistencies are much more subtle, and are everywhere. Peruse the string functions for a good example...

    > Again, Python? Also, I wasn't aware that PHP was "difficult to scale". No one else seems to have trouble with it. Well, "double-digit percentage of total internet traffic" sites excepted, of course. Though at that point, just about everything is "difficult to scale".

    for web apps I'd assume python and PHP have the exact same problems, and more or less the exact same solutions. PHP is going to be slower if you use mod_php over php-fpm though, which many don't do. As well, it's a lot easier to write up performance-dependent code in C when using python than when using PHP.

    > I've never seen a "web framework" I'd classify as "good", let alone "excellent".

    You should elaborate on this. Are these just frameworks for PHP and Python or are you being language agnostic with this statement? I've grown comfortable limiting my webapps to just RESTful APIs that frontends use and whipping up those APIs are painless in almost any language that has something similar to JAX-RS/Flask/etc

    > A language known for abysmal performance

    False, an implementation known for abysmal performance, which is CPython.

  • by Bengie ( 1121981 ) on Wednesday May 28, 2014 @11:43AM (#47109391)
    All kinds of people have trouble with PHP, they just don't realize it. It lulls you into a false sense of security by not throwing errors or warnings with its ultra-lax dynamic typing. PHP is like silly-putty, you can quickly make any shape you want, but thinking you've built something that you understand it is just fooling yourself.

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...