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

213 comments

  1. I got tired of waiting by Anonymous Coward · · Score: 1, Insightful

    And moved to Python instead.

    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 got tired of waiting by Anonymous Coward · · Score: 0, Funny

      So from slow to slow, i get it now.

    3. Re:I got tired of waiting by __keronin · · Score: 0

      what ?? python dev already start move to Go after 2->3 disaster

    4. Re: I got tired of waiting by Anonymous Coward · · Score: 0

      Yes.

    5. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      From inconsistent to consistent. From difficult to scale to easy to scale. From crappy web frameworks to excellent web frameworks with extensive built-in security features and a superb track record.

      I used to like PHP just because I didn't know of any better alternatives at the time I started learning it.

    6. Re:I got tired of waiting by narcc · · Score: 4, Insightful

      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.

    7. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      Python, you mean the language that doesn't necessarily facilitate true multi processor concurrency?

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

    9. Re:I got tired of waiting by Anonymous Coward · · Score: 0

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

      The biggest player I know that uses Python is Google. But I think this is irrelevant nonetheless.

      What would be your language of choice to replace PHP, narcc?

    10. Re:I got tired of waiting by Anonymous Coward · · Score: 1

      That's it? The biggest problem with python is that they don't have an int to arbitrary base string conversion?
      I could have understood if you complained about python getting slower when you use more threads on more than one CPU.
      Or the fact that their list implementation sucks so much that dicts are faster.

    11. Re:I got tired of waiting by Jesus_666 · · Score: 1

      No, that's one problem with Python. There are others like it but this one is mine. (Well, and a few others but most of the good ones were already mentioned.)

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    12. Re:I got tired of waiting by Adam+Jorgensen · · Score: 0

      I made the jump from PHP to Python years ago and I do not miss PHP.

      PHP is certainly easier to get a web application up-and-running with if you know nothing but beyond that it's a mess of a language that makes maintaining a clean code-base far more effort than it should be. It's basically scripted C for the Internet and not in a good way.

      Which is not to say Python is the holy grail. There are a lot of things I don't like about Python, including some of the ones you mentioned (Non-trivial whitespace still annoys me) but on the whole it's a better language than PHP and the amount of libraries and support available is good.

      At the end of the day, I'd rather be writing web applications in Python than PHP.

    13. Re:I got tired of waiting by Anonymous Coward · · Score: 1

      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.

      Not sure what you mean by that. The "print" function always worked fine; if you don't like it use the "write" function. Lambda functions work too. I've never seen language that remains consistent across versions (how many times have I had to decide between Java Version 5, 6, or 7, and don't get started about class paths and Jar Hell).

      Some of the best features of Python are often called out as inconsistencies or syntactic sugar by people who don't really understand them (e.g. list comprehensions).

    14. Re: I got tired of waiting by Anonymous Coward · · Score: 0

      Nah, I mean a giant snake that constricts its prey and lives in the jungle.

      No shit I meant python, idiot.

    15. Re:I got tired of waiting by citizenr · · Score: 1

      You wanted speed and you moved to Python? :DDDDDDDD

      --
      Who logs in to gdm? Not I, said the duck.
    16. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      Still, saying that a missing string conversion function makes python as inconsistent as PHP is a bit disingenuous.
      I'd give examples, but you can go read phpsadness yourself.

    17. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      oh god no, whatever can we do!

    18. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      String.format() can only convert from base 10 to bases 2, 8 and 16. There are no other built-in conversion functions. Admittedly, converting to thoer bases is rare but they could've at least make it consistent

      Yea, the horrors of needing a library function to perform some obscure conversion. Throw the language out, right now.

    19. Re: I got tired of waiting by Anonymous Coward · · Score: 0

      Heh, very funny.

    20. Re:I got tired of waiting by philip.paradis · · Score: 1

      I've never seen language that remains consistent across versions

      You must have missed Perl. It's remained remarkably consistent across major release versions when compared to many other languages, including Java and Python.

      Some of the best features of Python are often called out as inconsistencies or syntactic sugar by people who don't really understand them (e.g. list comprehensions).

      Backward incompatibilities are very real issues affecting a very large amount of code.

      --
      Write failed: Broken pipe
    21. Re:I got tired of waiting by i_ate_god · · Score: 3, Insightful

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

      --
      I'm god, but it's a bit of a drag really...
    22. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      Scala is probably the best choice.

    23. Re: I got tired of waiting by Anonymous Coward · · Score: 0

      Python is just the new favor of the day at any University or open source dev team.

      Can't get the consistency and performance than the older languages like java/c/Fortran/Ada... Even c#....

    24. Re:I got tired of waiting by Bengie · · Score: 3, Insightful

      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.

    25. Re: I got tired of waiting by Anonymous Coward · · Score: 0

      i have to wait for python to release the global lock before i can call you a moron...

      #WAITFORIT

    26. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      oh man, let's try a thought experiment. You liked php because you didn't know of anything better, right? Now you like python because you don't know of anything better. Hmmm... see a pattern?

    27. Re:I got tired of waiting by larry+bagina · · Score: 1
      At the end of the day, I'd rather be writing web applications in Python than PHP.

      "At the end of the day, I'd rather be a prison bitch for the aryan brotherhood than for the colombians." Me, I'd rather not be in prison.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    28. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      Python 2 to 3 was an explicit compatibility break and is more akin to Perl 6, which will not be backwards compatible with older Perl versions.

      Of course, they're not directly comparable, since Python 3 is released and has seen some adoption, while Perl 6 is still not finished, three years after the release of Duke Nukem Forever.

    29. Re:I got tired of waiting by digitalPhant0m · · Score: 2

      it's great for quick and dirty prototyping

      I've heard this for nearly every interpreted language. The only problem is: that quick and dirty prototype almost always winds up being the production codebase.

    30. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      Speaking as someone who does front-end dev work for a living, I've looked into NodeJS as an alternative to php. Not that I'd get rid of php entirely, it has its uses. It's easy to pick-up since the syntax of NodeJS since hasn't changed from JS. The only thing that you'd really need to learn is NodeJS's api.

    31. Re:I got tired of waiting by tepples · · Score: 1

      It lulls you into a false sense of security by not throwing errors or warnings with its ultra-lax dynamic typing.

      Unless you do like me and decide early on to convert warnings to ErrorException . Sure, there are a few wrinkles, such as the fact that the string '0' is falsey, the fact that comparison operators tend to cast strings to integer, and the inconsistent naming of much of the standard library. But PHP 5.4 and 5.5 have cleaned up the language itself somewhat. One problem is that a lot of shared web hosting providers still deploy outdated PHP versions.

    32. Re:I got tired of waiting by BlackPignouf · · Score: 1

      It's still faster than Ruby. :D
      PS: I love both anyway.

    33. Re:I got tired of waiting by Mitchell314 · · Score: 1

      But not BASIC. It's just dirty prototyping. :P

      --
      I read TFA and all I got was this lousy cookie
    34. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      And that makes you what? 1 link further down the chain?

    35. Re:I got tired of waiting by Anonymous Coward · · Score: 0

      In other words, PHP has been invented to make the work of some orgs much easier. As in "we don't need to send 007 there, fat computerboy in the next cubicle has them already fully covered".

  2. If PHP was a horse in the prog language race by Anonymous Coward · · Score: 4, Funny

    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.

    1. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0, Funny

      My metaphor for describing PHP is just in line with the traditional "tools in a toolbox" one.

      Although, a rather big difference with mines is PHP is more like a rotten dusty sandwich you forgot at the bottom under some tools, and you tried to hammer a nail with it.
      That is PHP in a nutshell.

    2. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      Oh look, another "PHP sucks" post. We know already. Just don't use it. Works for me.

    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:If PHP was a horse in the prog language race by narcc · · Score: 4, Insightful

      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.

    5. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 2, Informative

      I've seen the fractal article, and then I fact-checked it

      Did you fact check it using PHP?

    6. Re:If PHP was a horse in the prog language race by Ubi_NL · · Score: 0

      You mean like this one?
      http://eev.ee/blog/2012/04/09/...

      --

      If an experiment works, something has gone wrong.
    7. Re:If PHP was a horse in the prog language race by narcc · · Score: 1

      Oh, the article I mentioned in the post to which you replied?

      I guess you didn't bother read the next sentence before posting. I said before, I gave it fact-check it. Can you guess the results?

    8. Re:If PHP was a horse in the prog language race by El_Muerte_TDS · · Score: 2
    9. Re:If PHP was a horse in the prog language race by Ubi_NL · · Score: 1

      can you even spell?

      --

      If an experiment works, something has gone wrong.
    10. Re:If PHP was a horse in the prog language race by jellomizer · · Score: 1

      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.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    11. Re:If PHP was a horse in the prog language race by Ash+Vince · · Score: 4, Interesting

      I've seen the fractal article, and then I fact-checked it

      Did you fact check it using PHP?

      I am not sure what that second bit of PHP sadness it really moaning about to be honest.

      Ok, I understand the difference, but I also think that anyone who wrote code where the stacked ternary operators like that should be sacked. There are times when the ternary operator is useful, but it has to be used carefully if you want to keep your code easily readable by other people, stacking them like that is a quick recipe for unmaintainable junk useful for nothing else than building your own empire.

      Also, wouldn't a few well placed brackets both solve the problem and make the code more readable?

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    12. Re:If PHP was a horse in the prog language race by drinkypoo · · Score: 2

      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.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    13. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      Agreed. I use PHP for at least half of my coding, and it has its niche. That niche isn't medium or large sized web apps. It's quick scripts and hacks, which is exactly what 80% of the web is.

    14. Re:If PHP was a horse in the prog language race by Bigbutt · · Score: 1

      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]

      --
      Shit better not happen!
    15. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      Re: ternary operator; You're correct that the sample on the PHP sadness web site rather sucks on the understandability front, but it's still a valid point.

      There's this pattern I sometimes use in Perl. I think it's a decent, readable use of multiple ternary operators chained. It would probably fail in PHP. (And adding brackets would actually make this look worse.)

      return
            $d ? "$d_txt${h_txt}temu" :
            $h ? "$h_txt${m_txt}temu" :
            $m ? "$m_txt${s_txt}temu" :
            "${s}s temu";

    16. Re:If PHP was a horse in the prog language race by Xest · · Score: 4, Insightful

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

      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.

    17. Re:If PHP was a horse in the prog language race by Xest · · Score: 1

      You have a perfectly valid point about the fact that you should probably never write code like that anyway (I say probably because if I've learn anything in the world of programming it's that someone will always surprise you with a valid use case for something that otherwise seems unusable) but at the end of the day programming languages are tools of logic and so I would argue a key measure of a language is how logical it is - it's harder to manipulate logic, with illogical tools. Thus, an illogical component of a programming language must surely result in reduced marks for that language, no?

    18. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      > The "PHP is a fractal of bad design" article is a long well argued piece on PHP.

      No it is not. You're guilty of the same kind of hand-waving. -1

    19. Re:If PHP was a horse in the prog language race by Safety+Cap · · Score: 1

      I've seen the fractal article, and then I fact-checked it

      Did you fact check [phpsadness.com] it using PHP [phpsadness.com]?

      I am not sure what that second bit of PHP sadness it really moaning about to be honest.

      And that...is why you fail.

      --
      Yeah, right.
    20. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      You've made the standard anti-Windows-guy mistake of confusing ASP with ASP.Net.

      ASP is horrible crap. It depends heavily on pre-built COM binaries to do anything useful. Sure, you can find them (and buy them, bleh), but making them is nothing but pure pain. COM is crap. Thus, ASP is crappier crap.

      ASP.Net is good. It separates markup from code, and presents a reliable web application base that can be extended in just about any way you can imagine. Like PHP, you can build anything with it, and if you really have to, you can use those terrible (but already paid-for) COM binaries if you need them. And it's not Windows-only anymore. It's open-source. It's on GitHub. And it's going to integrate with Mono fully. Be sure to use it only for good (C#) and not for evil (VB). And don't bring your damned COM binaries to Linux. They won't work, thank god.

    21. Re:If PHP was a horse in the prog language race by jellomizer · · Score: 1

      I was talking about ASP.NET I didn't bring up ASP because it is out of date.

      The fact that you have your source in multiple languages is confusing,
      When you say it works with Mono Fully and add exceptions means that it isn't working fully.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    22. Re:If PHP was a horse in the prog language race by jlowery · · Score: 1

      If you find stacked ternary operators confusing, how the hell would you manage to untangle a complex SQL query?

      --
      If you post it, they will read.
    23. Re:If PHP was a horse in the prog language race by RyuuzakiTetsuya · · Score: 1

      I understand the nuttiness of ternary operators being nutty, but who the hell is doing math with INF and -INF?

      If you're doing complex math with PHP you're doing something horribly wrong.

      --
      Non impediti ratione cogitationus.
    24. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      > the entry from academia "Haskell" that has already completed the course and is back in the stables

      On a circular course, Haskell would realise that the start line is also the finish line so it's already at the destination and there's no need to even run the course.

    25. Re:If PHP was a horse in the prog language race by Xest · · Score: 1

      Oh hi narcc.

      How do I know it's you? Simple, because that's exactly what you'd say. That's also exactly the point I was making, rather than ever being able to justify your point you just come back with "I'm right your wrong".

      Responding the same way to the same person on multiple posts was a bit of a giveaway too FWIW because that's also something you do. Then there was your use of hyphenation in terms where it's relatively uncommon to hyphenate.

      I'd say nice try, but it really wasn't, even that was a rather pathetic attempt at avoiding the fact that you just cannot explain why the fractal article is wrong in any way whatsoever. You still just say it is and declare that your declaration is enough to make it so. It's really not and that's why far more people take that article seriously than take you seriously. Hiding behind AC doesn't change the fact that you have to date still never actually managed to provide any justification for your argument that the fractal article is wrong.

    26. Re:If PHP was a horse in the prog language race by narcc · · Score: 1

      The AC is not me. Nice troll attempt, through.

      In the past, I've commented on various parts of the fractal article. I'm sorry you missed them. it may have saved you a long pointless rant.

      It's a huge rant, and I'm not going to go through it line-by-line on a forum post. It would be a waste of time as I'm sure you'd simply find one debatable point and use that to dismiss the entire thing. That's how such things on slashdot always go.

      That's why I invite you to fact-check the article yourself. You can hunt down my criticisms if you want, but it's much easier for you to put those critical thinking skills to work and evaluate the article on objective terms. You'll find that the bulk of it is unsubstantiated opinion, and many of the "facts" are just flat-out wrong.

    27. Re:If PHP was a horse in the prog language race by Xest · · Score: 1

      You don't have to pretend you're not the AC, I couldn't really care less, especially as you've taken the opportunity to come out of hiding anyway now.

      "In the past, I've commented on various parts of the fractal article. I'm sorry you missed them. it may have saved you a long pointless rant."

      Please link to this, I'd love to see it.

      "It's a huge rant, and I'm not going to go through it line-by-line on a forum post."

      So why not create your own page to summarise your arguments like the guy who wrote the fractal article did? Then you can just link to it.

      " It would be a waste of time as I'm sure you'd simply find one debatable point and use that to dismiss the entire thing. That's how such things on slashdot always go."

      So you mean kind of like the exact debating tactic you've been using all along that I've been railing against you for using? Don't you think that's a bit hypocritical? It sounds just like an excuse to me.

      "That's why I invite you to fact-check the article yourself."

      I have and I can't really find much wrong with it, maybe a handful of errors out of hundreds of points. By and large it's exactly right.

      "You can hunt down my criticisms if you want, but it's much easier for you to put those critical thinking skills to work and evaluate the article on objective terms."

      Yep, that's what I've done and it turns out you're wrong. You tell us you're not, but you still evade justifying the argument that you're not wrong, you just say you're not and leave it at that. In fact, that's exactly what you've done yet again here right now. Why am I not surprised? You still seem more interested in arguing why you shouldn't have to justify a point when you could just as easily justify a point, why is that? why such desperate attempts at evading the issue?

      The problem is you've made it clear before you haven't even used PHP much, well, here's the thing, I have. I've used it in large professional projects, I've also used other languages like Java, C++, and C# in large professional projects too. I've got something you don't - first hand experience of PHP's problems, yet you still seem to think they don't exist. How can you even make that argument when you've admitted yourself previously you don't have any degree of worthwhile experience with it? Do you just like arguing in defence of a language for no other reason than to play devil's advocate even though you don't have a basis on which to do so or what? Is it just because you hate other OO languages like C++, Java, and C# with such a passion that you feel the need to defend anything that isn't them? I'd just love to know given your lack of experience with something why you go out your way to so vehemently defend it regardless using the most dishonest methods of discussion in the book.

      I get the impression you're very academically oriented, rather than real-world development oriented. I suspect that's as much where you fail to grasp the problems with PHP in the real world. You say they don't exist, but I assure you they're very real, which is not to say PHP doesn't have a place - as Gaygirlie mentioned in this discussion it works fine for her personal hacks and stuff, and that's fine. But for professional projects that require any degree of scale? Hell, even there it can work. It just doesn't work anywhere near as well as the alternatives, and it brings much more risk and cost to a project, and that's the problem.

      I see three types of PHP developers here:

      1) Those who use it in small scale personal projects and don't do anything big enough or important enough to run into any of it's issues

      2) Those who realise it's shit but suck it up and enjoy the fact there's still money to be made in shitty plugins for shitty CMS' with it and so on. They'll put up with it for the decent contracting rates and will defend it on that basis, not on the basis of technical excellence or any such thing.

      3) People who are in high end roles such as senior or lead development positions that have experience o

    28. Re:If PHP was a horse in the prog language race by Ash+Vince · · Score: 1

      If you find stacked ternary operators confusing, how the hell would you manage to untangle a complex SQL query?

      I have been doing this web development thing long enough now that I feel I can untangle just about anything given enough time, I have had to work on some serious drivel created by other people over the years. That does not make writing awful code a good idea though.

      I generally work on the the principle of making sure that any code I write could be understood by anyone as easily as possible, even if they are not a super duper code ninja like yourself. The only exception would be if the more readable approach caused serious efficiency issues, but in those situations I try to over do the comments.

      I generally consider the ternary operator to be useful shorthand but if I had to do lots of nested stuff like that I would write it as if-then-elseif-then-else which I find much clearer. It might involve more typing initially, but if it saves someone else time later then it's worth it in my opinion.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    29. Re:If PHP was a horse in the prog language race by narcc · · Score: 1

      You can knock-off your silly attempt to discredit me, accusing me of posting as an AC to support my own post. No one is buying it. It's also not relevant to the topic at all.

      You've written a book here. Why does it bother you so much that people like something that you don't like?

      The problem is you've made it clear before you haven't even used PHP much

      That must have been in your imagination. I've never said anything that would imply that.

      So why not create your own page to summarise your arguments like the guy who wrote the fractal article did? Then you can just link to it.

      I'd like to point out that you did, in fact, link to an article that addresses (some) of the shortcomings of the fractal article. There's even a discussion below which includes the fractal author. You ignored the facts there, what possible hope do I have?

      I'm sorry that reality does not conform to your preconceptions. That's not my fault.

      I see three types of PHP developers here:

      I'm sure you've done the relevant research prior to drawing that conclusion, right? Oh...

      I get the impression you're very academically oriented, rather than real-world development oriented.

      I honestly don't see anything wrong with that. I'll also note that most (if not all) of the "real-world" development stuff you run across is worse than useless -- the technical equivalent of self-help books. You'd think the guys in the trenches would notice, with the never-ending parade of fads competing for their attention, and start to demand actual research to inform them.

      The problem with this "feelings" based approach that's become so popular is that it doesn't actually inform you. You don't like PHP. Rather than try to work out why, you do a google search for "PHP sucks" or whatever and try to find reasons to validate your feelings. When you run across an article like the fractal article, which is absolutely abysmal, you feel like you've hit on something akin to real research. It's not. (You'll find many of his facts are flat-out wrong, and the bulk of the article is completely unsubstantiated opinion.) Even worse, it actively discourages you from using your critical thinking skills to make an objective evaluation.

      I've not found anyone who works with it to any reasonable degree, who has worked with other technologies to allow them to compare, and who actually likes it.

      Check this very thread. Hell, check this post.

      If what you say is true, that it's actually fine, then where are all the high end professionals (i.e. not just amateurs and people at the junior level) that use it and actually like it?

      Check this thread. If that doesn't satisfy you, consider that PHP powers >80% of websites (a link for you) not just small sites, but also major sites like Yahoo and Wikipedia. You don't get that kind of marketshare by being a virtually unusable mess, like some folks here seem to believe. You get that kind of marketshare by being better suited to the task than competing languages.

      I don't think you'll need to look too far to find "high end professionals" (I wonder what your criteria for that would be?) that actually like it. You've got an awfully big pool of users to draw from.

      As you're practically minded, why not ask yourself how PHP became so popular? Why has it continued to grow year-after-year in the face of increasing competition and decreasing reputation on sites like Slashdot? How do the alternatives compare to it in practical terms?

      Granted, very awful things can also become quite popular, though you can usually find a good reason for it. That's something exploring questions like the above can help discover.

    30. Re:If PHP was a horse in the prog language race by Xest · · Score: 1

      "When you run across an article like the fractal article, which is absolutely abysmal, you feel like you've hit on something akin to real research. It's not. (You'll find many of his facts are flat-out wrong, and the bulk of the article is completely unsubstantiated opinion.) Even worse, it actively discourages you from using your critical thinking skills to make an objective evaluation."

      We don't seem to be getting anywhere. You're still parroting the same old thing whilst evading backing it up by explaining where exactly it is wrong. I've been asking you for an objective evaluation all along, that's been the very point of every one of my posts - to get an objective evaluation from you, but you just cannot provide one can you?

      "I honestly don't see anything wrong with that. I'll also note that most (if not all) of the "real-world" development stuff you run across is worse than useless"

      That doesn't make any sense. How can real world stuff be useless? By definition real world stuff is stuff that's used in the real world, and hence, not useless. I don't have any inherent problem with the academic view of the world, as long as there's recognition that it doesn't necessarily play out in practice. Case in point I had a grouchy old comp. sci. professor who declared his distaste for the fact that proof by induction wasn't carried out on every bit of code on earth to make better more secure software - that's a great theory but if we did that then we'd never actually get anything done. Theory isn't fact, and fact can diverge from theory in practice, that's something academics can sometimes get wrong. Even your signature highlights this- as awful as OO might be, it's still been better than anything else for actually getting most software built in practice over the last 20 years so someone like Djiksta can rally against it all he wants (though I hear that quote actually never came from him anyway) but it doesn't change the fact that there's been no better alternatives for practical large scale development until recently.

      "consider that PHP powers >80% of websites (a link for you) not just small sites"

      I'm glad you finally tried to justify at least one of your points, but by way of objectivity one has to consider why that's so massively contradicted by for example this site which puts it at only 18.6% marketshare:

      http://trends.builtwith.com/fr...

      We need something more transparent with it's data, neither of these sites are. Putting that aside and giving your link the benefit of doubt for now, even your link highlights the fact that PHP is mostly powering small sites - it's bottom of the list by measurement of how much it's used in high traffic sites. This reiterates the point that it's mostly just used for unimportant stuff, more often than not PHP's growth comes from installations of things like Drupal or Wordpress for personal sites that just end up getting left to rot, which is fine, but it means much of it's usage has nothing to do with how much it's being used as a language for software development. Installation of a copy of Drupal is not the same as writing any actual PHP code.

    31. Re:If PHP was a horse in the prog language race by narcc · · Score: 1

      You're still parroting the same old thing whilst evading backing it up by explaining where exactly it is wrong.

      It would be easier to point on the bits it gets right! As I've said before, just about everywhere. You have a link which points out a few problems with the article, but refuse to accept reality.

      If it's that important to you, pick a section of the article and I'll help you evaluate it. You clearly need the extra hand-holding.

      Of course you'll need to know the difference between fact an opinion. From the nonsense article:

      PHP does not overload +. + is always addition, and . is always concatenation.

      Need some help?
      While it is a fact that + is not overloaded and . is always used for concatenation, that this is a bad design choice is purely opinion. I don't mind opinion so much, as this is a subjective sort of thing, but unsubstantiated opinion is worthless. Why does he think this is a problem? I'll never know. "It's bad design 'cause I don't like it!" isn't very convincing.

      Now that that's out of the way. Before you post the section you want to discuss, save us both some trouble by first stripping out any empty rhetoric (like the analogy section) and any unsubstantiated opinion. What's left should be points of fact and arguments. We can tackle those individually.

      Once you have some experience making an objective evaluation, you can tackle the rest of that ridiculous article. I suspect that you'll stop quickly, once you realize that it's not likely to improve.

      That doesn't make any sense. How can real world stuff be useless? By definition real world stuff is stuff that's used in the real world, and hence, not useless.

      Not a big thinker, are you? Useless, as in "offers no practical benefit". I'll take it a step further and say that most "real-world" development trends are worse than useless. Offering not only no practical benefit, but are actually harmful.

    32. Re:If PHP was a horse in the prog language race by DrGamez · · Score: 1

      (hi narcc)

    33. Re:If PHP was a horse in the prog language race by Xest · · Score: 1

      "It would be easier to point on the bits it gets right! As I've said before, just about everywhere. You have a link which points out a few problems with the article, but refuse to accept reality."

      So the issue then is you have a distorted view of what reality is it would seem. What exactly makes the "rebuttals" correct, but not the original authors response to those "rebuttals"? You've still got the same problem, you need to elaborate why the original author is wrong. This is still a thing you seem completely unable to do.

      "While it is a fact that + is not overloaded and . is always used for concatenation, that this is a bad design choice is purely opinion. I don't mind opinion so much, as this is a subjective sort of thing, but unsubstantiated opinion is worthless. Why does he think this is a problem? I'll never know. "It's bad design 'cause I don't like it!" isn't very convincing."

      That would be a good start if you didn't quote out of context, full quote:

      "Despite the craziness above, and the explicit rejection of Perlâ(TM)s pairs of string and numeric operators, PHP does not overload +. + is always addition, and . is always concatenation."

      So he's not saying it's bad in itself, he's saying it's inconsistent, because in some cases the language designers have opted to avoid explicit operators and go for operators that work in multiple contexts, then in others they've chosen not too. It's like they couldn't decide what their policy on that was - are they going to have unique explicit operators or not? The language design is too ad-hoc.

      But despite the fact you clearly got this one wrong and tried to hide it by quoting out of context, I don't want to discourage you now you're finally at least trying to justify your point, so go ahead find a few more. You don't need me to pick a section for you, I'm offering you better than that - I'm letting you choose from the entire article, and given that you feel it's almost all wrong it'll be easy for you to find a whole bunch of other things to argue against wont it?

      "Not a big thinker, are you? Useless, as in "offers no practical benefit". I'll take it a step further and say that most "real-world" development trends are worse than useless."

      Okay I can see you're getting flustered now at being called out on your unjustifiable arguments by the amount of insults you've started resorting to spewing, but given that you seem to have no worthwhile real world development experience why do you feel justified to make these comments? How can you make a claim when you have no grounding to base it on?

      You talk about objectivity, but I've done a lot of academic study, and have a lot of professional real world experience, as does the guy who wrote the fractal article I believe. Why are you so certain in your academic bubble that your view is somehow objective when it by definition, due to lack of broader experience cannot be? You cannot preach objectivity from a position of complete ignorance about the other side of the argument. Even then your academic background is clearly not rigorous given the level of inconsistency and poor design you defend in PHP. PHP certainly doesn't fit the mathematically grounded academic rigour that would please any of the greatest academics in the field of computer science either.

    34. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      Why isn't phpsadness using PHP_EOL ???

    35. Re:If PHP was a horse in the prog language race by Anonymous Coward · · Score: 0

      I've seen the fractal article, and then I fact-checked it

      Did you fact check [phpsadness.com] it using PHP [phpsadness.com] ?

      I am not sure what that second bit of PHP sadness it really moaning about to be honest.

      That might be you.

  3. What about PHP on the JVM? by monzie · · Score: 1

    A quick google search points me to one interesting project - "jphpcompiler" - https://github.com/jphp-compil... . 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.

    1. Re:What about PHP on the JVM? by Anonymous Coward · · Score: 2, 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.

      Any chance you could throw some Haskell and M4 macros in there, too?

    2. Re:What about PHP on the JVM? by Anonymous Coward · · Score: 0

      I think I just threw up in my mouth a little...

    3. 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
    4. Re:What about PHP on the JVM? by smittyoneeach · · Score: 1

      That project's going nowhere without an Emacs major mode and a slew of eLisp.

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

      Doesn't seem like a bad idea. HotSpot will likely always be faster, more secure and more reliable than any VM the PHP devs cobble together.

      --
      Mod me down, my New Earth Global Warmingist friends!
    6. Re:What about PHP on the JVM? by Rufty · · Score: 1

      There's Quercus a java implementation of PHP. Saw it, bookmarked it, never done anything with it.

      --
      Red to red, black to black. Switch it on, but stand well back.
    7. Re: What about PHP on the JVM? by Anonymous Coward · · Score: 0

      Its exactly what the world needs. 4X performance on Drupal compared with standard PHP and that's without the support for dynamic languages introduced with Java 8.

      As the JVM currently delivers the best web server performance. And with the upcoming HSA there will be no competition.

    8. Re: What about PHP on the JVM? by Anonymous Coward · · Score: 0

      Yeah and don't forget that the HSA standard allows Java to run directly on the the GPU. There are no way to complete with that.

    9. Re: What about PHP on the JVM? by Anonymous Coward · · Score: 0

      I have. It runs drupal on a fourth of the hardware required by standard PHP and I run high load drupal sites. It saved me a lot of money. I previously tried IronPHP but it can't run Drupal.

  4. PHP: The Good Parts by Anonymous Coward · · Score: 1

    https://twitter.com/i_error/status/471584795987021824

    1. Re:PHP: The Good Parts by Aethedor · · Score: 1

      A very good part: Banshee PHP framework.

      I know this post will be flagged as spam. But if you like PHP, I challenge you to give this framework a try. At least take a look at the online demo.

      --
      It doesn't have to be like this. All we need to do is make sure we keep talking.
    2. Re:PHP: The Good Parts by master_kaos · · Score: 1

      I was tasked to find a framework for our development team to work. I tried 1/2 a dozen frameworks spending a couple days each. Ones I tried were Zend, Yii, CodeIgnitor, Symfony 2, Larval and one other that I can't remember at the moment.

      Out of those I narrowed it down to Yii and Symfony. I then spent another couple days cloning one of our small projects in both frameworks to see which ended up being a better code base. I showed both projects to the team and said developing I found Symfony more complicated to get up and running, however once I did I found it much more enjoyable to use than Yii. I also presented a pro and con list that I came up with after using each for a week and presented that as welel.
      Every other developer agreed and we have been using Symfony since. Symfony actually almost makes it hard to write bad code. And makes you go out of your way to actually write SQL injection code. The documentation is also fantastic which I find a lot of the other frameworks lacking severely with. We do not regret going with Symfony. The only thing we have an issue is with batch processing which I cannot using the ORM component since it cannot handle tens of thousands of objects quickly

    3. Re:PHP: The Good Parts by Dogers · · Score: 1

      Can you share the pros and cons?

      --
      I am a viral sig. Please copy me and help me spread. Thank you.
    4. Re:PHP: The Good Parts by master_kaos · · Score: 1

      I lost the list, but off the top of my head the pros and cons were more based off of personal coding style than anything else. But a few things I found better with Symfony was namespacing(Yii didn't have any), the majority of the components being modular so you can pick and choose what you want, the OOP was a lot better (Yii was actually doing eval in some of their base components), Yii was using ActiveRecord. I had others but can't remember them anymore... I only played with each for about a week when I came up with my list so it is far from exhaustive.

  5. Tidy it up !!! by Anonymous Coward · · Score: 1

    Dear php developers. Please tidy up the namespaces and introduce consistency to your naming of functions etc. Pick some rules and STICK TO THEM.

    The current code base is a mess and looks really tatty when compared to .Net, Java etc. !

    Thanks.

    1. Re:Tidy it up !!! by GNious · · Score: 1

      purely out f curiosity: Since Java and .Net both have gone through significant changes, did they look just as tatty in earlier revisions compared to now?
      (e.g. Java 1.0, 1.1)

  6. PHP-slashdot by Anonymous Coward · · Score: 1

    It's so fun reading anything related to PHP in Slashdot as the discussion resamples the late "fuck beta" postings. Full of hate and anger, usually from people who don't even use it (as they use any other language but PHP because they're better).

    1. Re:PHP-slashdot by Anonymous Coward · · Score: 0

      Don't things always progress, if they were not to, what could possibly happen?

  7. If Java was a fish by Anonymous Coward · · Score: 0

    Java would be a Flying Carp. Invasive, taking over and destroying every ecosystem it gets into.

    PHP is more like a Bluegill; a good place to start (fishing or programming) but most people move on to better things.

  8. I'd rather code COBOL or FORTRAN by msobkow · · Score: 3, Insightful

    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.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 1

      Classic ASP is pretty awful, too.

    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:I'd rather code COBOL or FORTRAN by narcc · · Score: 0

      It is, bar none, THE WORST LANGUAGE I have ever used.

      I take it you haven't used many languages. It's far from the worst. Ever use Python? Blech!

      the humungous amount of copy-paste code that PHP requires

      What? You should probably elaborate here, as no "copy-paste code" is required.

      I've had the misery of suffering with maintaining a few PHP applications over the years.

      Ah, I see. You think the language sucks because your only exposure to it is a messy code-base you inherited. Can you direct me to the magical language that does not allow developers to produce a nasty mess that's difficult to maintain?

    4. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      Oh here's widdle narrcy warrcy again with his rah rah PHP support.

      Dude, give it up. Nobody wants your immature piece of shit language. You know, the jizz gargling hunk of junk that didn't even have real object support until V5, the one that makes a clusterfuck of something as simple as a namespace. I could go on.

      Perl, Ruby, Python, they all put PHPs dick in the dirt, full stop.. it's the 'PHP in 24 hours' types like you that keep it going (and keep things exploitable LMAO).

    5. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 1
      Sorry, did you just compare PHP to Python and make the claim that Python is more disgusting than PHP? I'm not a fan of Python (self self.self self? self self) but at least it's sane.

      You think the language sucks because your only exposure to it is a messy code-base you inherited.

      Or maybe it's because PHP really does suck the big hard one? Who knows? Total mystery.

    6. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      Can you direct me to a language other than PHP that manages to make the ternary operator useless?

    7. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      The PHP community must be immensely impressed by your fine and intelligent arguments instead of just shouting that something SUCKS.

      Oh.

    8. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      "The PHP community" is the worst part of PHP and a good argument against it.

      PHP user: "Guys, I've found a bug in PHP here..."
      PHP community: "It's an edge case no one will ever encounter! It's not a bug!
      PHP devs: (edit PHP docs to say "Note: using this function on the last day of month can lead to arbitrary code execution")
      PHP community: "See! It's documented! It's not a bug!"

      Or:
      PHP user: "It'd be nice to have this common feature..." (try/finally, say. Or not having to google T_PAAMAYIM_NEKUDOTAYIM when error message could say "unexpected '::'")
      PHP community: "Who needs this? W3School never mentioned this, what is this anyways?"
      PHP dev: "Agreed. Completely unnecessary, don't waste our time. Also here's a clunky work-around that incorrectly implements half of this feature"
      PHP contributor: "Umm, here's a 5 line patch to implement this..."
      PHP dev: "Yes, yes, this is exactly what I wanted to do, but did know how!.. Not that I couldn't do it if I wasn't so busy documenting bugs^Wmisfeatures"

      And it's not just core language - for example, here's a crypto library which thinks that a complete security failure only warrants a quiet warning.

    9. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 2, Insightful

      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.

    10. Re:I'd rather code COBOL or FORTRAN by caseih · · Score: 3, Insightful

      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.

    11. 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...
    12. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      If you use the object-oriented facilities, it is as capable and clean as any other high-level language.

      No, it isn't.

      Let's pretend that the code you write yourself is perfectly fine. (Unlikely if you think PHP is a "very clean" language.)
      You still have to deal with the standard library where object orientation is practically non-existent.

      The string functions are modelled on C, a low-level language without a string type.
      The array functions include 12 separate functions for sorting an array.

      Error handling is miserable. The PHP standard library deliberately avoids throwing exceptions, so you either get a fatal error, or a ignorable warning and if you're lucky, a return value indicating error. And the error value is likely == some other non-error return value just to trip people up further.

      It might seem "as capable and clean as any other high-level language." if you've never used a real programming language, but eventually you get some experience and realize that it's a mud cake, made by children, for children, and they're sitting around eating it and thinking it is real food.

    13. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      The problem with people like you is that you don't know as much as you think you do.

    14. Re:I'd rather code COBOL or FORTRAN by Anonymous Coward · · Score: 0

      You still have to deal with the standard library where object orientation is practically non-existent.

      As far as I understand, OO in PHP is still quite new, so it's to be expected that not all the existing supporting code has been ported yet.
      My point was that if you start a project now you can encapsulate your own code cleanly and get as good an architecture as you can with any other high-level language. You might have to call some dirty standard functions, but if that's what's forcing you to write bad PHP code, then I'll question *your* coding ability.

      The string functions are modelled on C, a low-level language without a string type.

      C does have a string type, as far as the standard functions are concerned: an array of chars terminated with a \0.
      And it did make sense for PHP to model their string functions after the C standard library since like C, PHP did not have objects back then.

      The array functions include 12 separate functions for sorting an array.
      Error handling is miserable. The PHP standard library deliberately avoids throwing exceptions, so you either get a fatal error, or a ignorable warning and if you're lucky, a return value indicating error. And the error value is likely == some other non-error return value just to trip people up further.

      Can't defend any of that. Yeah, PHP has a lot of problems derived from its need to create an inclusive and easy language. But there's also good plumbing there, and if you know what you're doing you can avoid the bad and use mostly to good parts to create a very good modern software architecture.

      I notice that most (if not all) of your criticism is related to the standard library. The stdlib isn't the language. Granted it's a very important part, but by no means what makes or breaks a language.

      It might seem "as capable and clean as any other high-level language." if you've never used a real programming language.

      So what's a "real programming language"? Is that the same as the real scotsman?
      By your standards, no language is clean. C and C++ certainly aren't, but it doesn't mean you can't write good clean code in those languages. Kernel hackers manage to do it every day.
      Then you have projects like OpenSSL which seem to be the worst of the worst (at least after reading through the changelog for LibreSSL). Same language, completely different results, who would've thunk it?

  9. Until NSA... by Anonymous Coward · · Score: 0

    ...gets their interns or 3rd parties in the PHP dev team, I have no reason to use it.

  10. You'd boil that horse down for glue by smittyoneeach · · Score: 0

    . . .and the users would be all: "What're we supposed to do with this snot?"

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  11. Java is. . . by smittyoneeach · · Score: 1

    . . .what happens when bureaucrats and computer scientists procreate.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  12. Reinventing the wheel by ajyand · · Score: 0

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

    1. Re:Reinventing the wheel by Anonymous Coward · · Score: 0

      No, nodejs isn't the answer to everything!

    2. 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.
    3. Re:Reinventing the wheel by Anonymous Coward · · Score: 0

      >using javascript outside a webbrowser
      I think long term exposure to toxic waste has damaged your mind. Only a complete moron would even consider node.js as a solution. It would take a monumental fuckup of a moron to actually use it.

    4. Re:Reinventing the wheel by El_Muerte_TDS · · Score: 1

      why use node.js when you can use Java

    5. Re:Reinventing the wheel by gl4ss · · Score: 1

      I'd take node.js over php any day of the week. also over python. practically over anything that doesn't have true threads really since that's the thing that makes node messy for some use. for everything else it's pretty damn neat.

      )unless you just take a boilerplate "kit" of software for creating a website and end up with 20 different libraries and something that goes through 10 libraries for http reply... but only a php idiot would go that way(spoiler: many node projects end up that way).

      --
      world was created 5 seconds before this post as it is.
    6. Re:Reinventing the wheel by Anonymous Coward · · Score: 0

      Because you prefer when your application crashes, it gives you an error message instead of taking down all of tomcat.

    7. Re:Reinventing the wheel by dogvomit · · Score: 1

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

      Obligatory reference: ... all the complexities of assembler with the efficiencies of javascript.

    8. Re:Reinventing the wheel by ajyand · · Score: 1

      You didn't have to write such a long explanation to my small comment. Whatever you have written is all well known. JavaScript got its JIT module some time around 2008-2009 while PHP is still trying to locate the axle. JavaScript is beautiful not just from the programming point of view but also as an embedded language in virtually any software developed in any programming language. You are correct that Node.js is still getting there but only time will tell what will dominate the already divided market.

    9. Re:Reinventing the wheel by Anonymous Coward · · Score: 0

      " JavaScript is beautiful not just from the programming point of view but also as an embedded language in virtually any software developed in any programming language."

      Let me fix this statement for you:

      "JavaScript is fucking awful not just from the programming point of view but also as an embedded language in virtually any software developed in any programming language *where every implementation is slightly different and writing truly portable code in JavaScript is a fucking nightmare*."

      I'm not saying there are alternatives, but c'mon, let's not ignore the *massive* problem with JavaScript. Just limiting yourself to a handful of browsers is bad enough, let alone everything else....

    10. Re: Reinventing the wheel by Anonymous Coward · · Score: 0

      What do bugs in a java program have to do with Java? Tomcat are crap, what's the news? Use a better appserver.

  13. This is why PHP continues to thrive by Qbertino · · Score: 4, Interesting

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

    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.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      >this is why PHP continues to thrive
      No. it came first and it, like html, attempts to keep on turning even in the face of errors instead of making the programmer fix their code. PHP programmers are shitty programmers. they do not want to have to fix their code. As long asit does something, they are happy. This is why PHPdriven sites are so epically insecure.

    2. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      Them checking the performance of Wordpress (...) 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.

      Are you kidding us? How ELSE are you meant to improve performance, testing against ghosts? Look up history, we have Windows font rendering in the kernel because performance is more important than security!

      And yes, that's a diss against both PHP and Wordpress as security catastrophes. While you think performance is critical, I can throw hardware at the problem to solve it, but I can't throw hardware to solve security problems if the language is a ticking bomb of uncertainity.

    3. Re:This is why PHP continues to thrive by wazzzup · · Score: 1

      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.

    4. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      I think the biggest problem with PHP is the existing code written by non-coders. It is increadibly easy to write shitty PHP code, and hard to write good PHP code, but even harder to maintain shitty code. In a lot of cases it is easier to re-write a php program than to fix it. You could even call it a basic concept of PHP.

    5. Re:This is why PHP continues to thrive by drinkypoo · · Score: 1

      In a lot of cases it is easier to re-write a php program than to fix it.

      People have been making the same complaint about code in all languages since forever. If that is the strongest indictment against PHP, then it is one of the best languages ever created.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    6. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      You edit CMS templates for a living? How have you not shot yourself in the head yet. Yeesh.

    7. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      In Germany, there is no Amendment II. In Germany, only few people have weapons.

    8. Re:This is why PHP continues to thrive by Xest · · Score: 0

      It's a problem of optimisation. I've delivered a large successful PHP project, I took over after 9 months into a 2 year project once the technology and so forth was already set in stone and it was too late to change. It was already 2 months behind schedule at this point but I managed to pull it back and deliver it on time and with a 69% gross profit margin.

      I was actually praised for this by the client, and by my employer. They were all happy, and you're absolutely right that this then means they don't care how shit it was.

      But here's the thing that bugged me. I knew without a doubt that had that project been done in .NET or Java that it would've been delivered with an 80%+ gross profit margin because of the increased productivity. The issue was a combination of the fact that yes PHP gets you off the ground quickly but in the long run all that advantage is long lost compared to compiled languages in terms of debugging. We also had scalability issues because of the fact PHP didn't at the time (and still barely does) have any proper support for concurrency so we had to implement all sorts of hackish workarounds when .NET and Java support that out the box and would've just worked.

      But worse than that, I know for a fact that whilst we delivered to spec they're going to want to grow that system in the long run and without the resources of a behemoth like Facebook that can just throw ever more money at it that solution is only going to scale so far and they're only going to have to re-write the whole thing anyway. On the topic of Facebook it's fascinating how many resources Facebook has plowed into just keeping it running compared to the amount other large tech companies have to plow in - they have according to figures they released previously around 8gb of RAM per user across their data centres which seems grossly excessive. They've invested a fortune on research trying to first translate PHP into C, and now in inventing a JVM for it.

      So yes you're right, you're absolutely right, people get shit done with it, stuff gets delivered, end users are happy with the results. But it's still not a good thing, it's a massive inefficiency and the hidden costs of greater development time, more strenuous maintenance requirements and shorter potential product lifespan of a decent sized PHP system.

      The problem is not that PHP doesn't, or can't work. It's how much money is being thrown away on PHP projects. It's the fact that in a world without PHP software could be being written that costs less, performs better, is more flexible and more secure.

    9. Re:This is why PHP continues to thrive by Xest · · Score: 1

      ^ Should've been GP of 60%, not 69%. Typo.

    10. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      > PHP software could be being written that costs less, performs better, is more flexible and more secure.

      Nothing about PHP or NET or Java has anything to do with security. Exploits are about how permissive you make your inputs for all of those languages, equally. You failed to make a coherent argument and have done lots of rephrasing the same old "I don't like this" that most /. critics throw about. -1

    11. Re:This is why PHP continues to thrive by Anonymous Coward · · Score: 0

      >this is why PHP continues to thrive
      No. it came first...

      Are you trying to tell us that PHP is the first programming language?

    12. Re:This is why PHP continues to thrive by Xest · · Score: 1

      Incorrect. Runtime and frameworks have a large impact on security. The implication of your argument is that every runtime and framework is completely secure such that the only place security vulnerabilities can exist is in bespoke code. Obviously this is false, so leave security to professionals who actually know what they're on about please. There's enough PHP developers out there causing most of the world's web facing security risks, we don't need more of you exacerbating the problem with such demonstrable cluelessness.

    13. Re:This is why PHP continues to thrive by narcc · · Score: 1

      No. it came first

      Because no one used Perl, right? Oh, wait...

      PHP won because it was really easy to deploy and really easy to use. Far easier than Perl. That's why there are so many "shitty" PHP developers and so much awful PHP code out there -- there's virtually no barrier to entry. For some inexplicable reason, people take this to mean that the language sucks.

      Insecure developers HATE anything and everything that's easy to use. It threatens their jobs, and their egos.

  14. This is why PHP continues to thrive by Qbertino · · Score: 1, Redundant

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

    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 Euros 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?

    Bottom line:
    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.

    --
    We suffer more in our imagination than in reality. - Seneca
  15. Well, I, for one, like it by Gaygirlie · · Score: 1, Insightful

    Everyone is always bashing PHP even when they don't have any good reason for that, it's kind of like it's trendy to bash on World of Warcraft or stuff. Well, I happen to like PHP, I use it in my own stuff all the time. Sure, I don't use any of the more advanced features nor do I maintain a 50k+ codebase, but for my own use it's been great.

    1. Re:Well, I, for one, like it by jones_supa · · Score: 1

      How large are your codebases then?

    2. Re:Well, I, for one, like it by Anonymous Coward · · Score: 0

      Sure, I don't use any of the more advanced features nor do I maintain a 50k+ codebase, but for my own use it's been great.

      You just answered your own question. PHP is an amateur's language. Some will rail 'but.. but.. but you can do professional code in any language!'.

      Sure kid, and I can tow a tractor trailer with a Toyota Tacoma pickup if I swap transmissions to gear it low enough and equip it with wide tires, but it's not the optimal solution.

    3. Re:Well, I, for one, like it by Rufty · · Score: 1

      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.

      --
      Red to red, black to black. Switch it on, but stand well back.
    4. Re:Well, I, for one, like it by Anonymous Coward · · Score: 0

      I don't code in PHP, but I've had to deal with managing multiple applications on a server. The thing that frustrated the hell out of me was the major incompatibilities between minor versions that weren't backwards-compatible. If I upgraded my server and the new distro used, say, version 5.3 instead of 5.1, it was inevitable that the PHP applications would break fundamentally. Then you either have to pester the application authors to fix it, or get into the mess of keeping multiple PHP versions around. It was always a pain in the ass, and I'm glad I don't have to do it any more.

    5. Re:Well, I, for one, like it by Powys · · Score: 1

      Everybody hates PHP, I get it. I don't. I understand all complaints to PHP, but I have learned to deal with them (I keep a php.net tab open so I can get the paramters in order). I currently maintian a PHP codebase that is just over 1 million lines of code. It is hosted on a cluster of servers that number about 30 (databases, sessions, application, static content, etc). The beautiy of PHP is the tight integration with Apache. When you do Apache right with PHP, you can make a website scale to no end (reverse proxy, load balancing, hot-standby, etc).

      A budy of mine used to have this awesome quote: "It's not the language, it's the people". You can write shitty code in any language. You can write elegent code in any language. Shitty devs will write shitty code. It matters not what the language is.

      Don't get me started on Node.js. It seems neat on the surface, but I'll be damned if I let my front end devs ever touch server side code. It is a completely different world with massivly differnet mind sets. It is dangerous to think you can unleash people well on both front and back sides of the coin.

    6. Re:Well, I, for one, like it by Anonymous Coward · · Score: 0

      Sure, you can write shitty code in any language, but PHP actively helps you do so.

    7. Re:Well, I, for one, like it by Powys · · Score: 1

      I have no problem writing non-shitty code in PHP. I keep hearing that exact same line, but it doens't make any sense. If php actively makes you write bad code, I say javascript is worse.

    8. Re:Well, I, for one, like it by Anonymous Coward · · Score: 0

      What's your point? Idiots can write in any language. There may be a low barrier to learn, but the barrier is still high to excel. I can do anything very well in PHP, and I's sure people could do the same thing in other languages... it's not really about the tool used to get the job done, but rather doing the job the *right* way which takes skill and experience.

    9. Re:Well, I, for one, like it by Algae_94 · · Score: 1

      Sure kid, and I can tow a tractor trailer with a Toyota Tacoma pickup if I swap transmissions to gear it low enough and equip it with wide tires, but it's not the optimal solution.

      If you had just gotten a Tundra you could tow the space shuttle.

    10. Re:Well, I, for one, like it by narcc · · Score: 1

      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.

  16. I confirm: The Beta UI is really shitty! by Qbertino · · Score: 2

    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.

    --
    We suffer more in our imagination than in reality. - Seneca
  17. Why? Isn't there HHVM already! by f00zbll · · Score: 1

    I fail to see the point. Facebook already made HHVM and it's open source. http://hhvm.com/
    What do the gain out of it. Why not contribute to HHVM instead?

    1. Re: Why? Isn't there HHVM already! by Anonymous Coward · · Score: 0

      Because HHVM isn't a drop-in replacement.

      HHVM's existence is good for the PHP ecosystem if the rivalry motivates the PHP developers to keep improving the language and runtime.

  18. PHP Upgrade? by LifesABeach · · Score: 1

    How about Multi-Threading? I use to be able to do it, now I can't seem to get it to work?! :/

    1. Re:PHP Upgrade? by dave420 · · Score: 1
    2. Re:PHP Upgrade? by LifesABeach · · Score: 1

      Cool, thanks; I will look into it.

  19. with every improvement, more to loathe. by nimbius · · Score: 1

    PHP has always been to me the Ikea of programming languages. At some point its not a lamp, you've used up all the pegs for holes that take screws instead but still fit, and your wifes import lamp was done hours ago despite your best efforts.
    And if more than 10 people in a room want to enjoy your lamp, the chain comes loose and your cat comes down with the squirts.

    --
    Good people go to bed earlier.
  20. PHP? by Lisandro · · Score: 1
    1. Re:PHP? by Anonymous Coward · · Score: 0

      get a life.. for real. Always easy to play MMQB, harder to actually *do* something.

    2. Re:PHP? by Lisandro · · Score: 1

      get a life.. for real. Always easy to play MMQB, harder to actually *do* something.

      I've worked with PHP and its assorted web frameworks enough times to completely relate to what that site tells.

      That an amateur language like PHP holds 80% of the web marketshare seems insane until you actually realize that 80% of the web is hardly professionally developed either.

    3. Re:PHP? by narcc · · Score: 1

      A shame you've never given it a good fact-check. That site is just short of being complete nonsense.

    4. Re:PHP? by Lisandro · · Score: 1

      Really? Most, if not all of it, is stuff i've ran into in the past. The nonsensical comparison operator results and the so-called "arrays" pop into my mind right now...

    5. Re:PHP? by narcc · · Score: 1

      The nonsensical comparison operator results

      I see. You're just confused by dynamic languages. Try the same operations in C, with the relevant casts, and note the results. Hey, look at that! Not quite so "nonsensical" now, is it?

      Like I said, give that article a good fact-check. You'll regret ever recommending it.

    6. Re:PHP? by Lisandro · · Score: 1

      I see. You're just confused by dynamic languages. Try the same operations in C, with the relevant casts, and note the results. Hey, look at that! Not quite so "nonsensical" now, is it?

      Like I said, give that article a good fact-check. You'll regret ever recommending it.

      "Dynamic languages" eh? Show me a "dynamic language" where i can do this (blatantly stolen from this site):

      $ cat circular.php
      <?php
       
      $a = INF;
      $b = array();
      $c = (object)array();
       
      var_dump($a < $b);
      var_dump($b < $c);
      var_dump($c < $a);
       
      $ php circular.php
      bool(true)
      bool(true)
      bool(true)

      You're right though. Nonsense confuses me.

    7. Re:PHP? by Lisandro · · Score: 1

      Oh, and by the way. Why do people insists on comparing PHP to C? Isn't PHP supposed to be a high-level, website oriented scripting language?

      I ask because i've seen bugs about PHP segfaulting reliably rejected only because "this behavior is consistent with what lower level languages like C do". It's like watching an exploit slowly growing from its infancy.

    8. Re:PHP? by narcc · · Score: 1

      Can't read the documentation, eh? Object and anything, object is always greater. Array and anything, array is always greater. Object has precedence.

      Think: How would you compare a double to an array anyway? How would you do it in other languages? What would the results be, provided you did the appropriate type conversions?

      This stuff isn't complicated.

    9. Re:PHP? by narcc · · Score: 1

      Oh, and by the way. Why do people insists on comparing PHP to C?

      Because it's a language that others are likely to already understand. PHP is also written in C, which likely influenced the language.

    10. Re:PHP? by Lisandro · · Score: 1

      Because it's a language that others are likely to already understand. PHP is also written in C, which likely influenced the language.

      So are Python, Perl, Ruby and Java, and you won't see anyone comparing them to C. That's a poor argument.

    11. Re:PHP? by Lisandro · · Score: 1

      No, it should not be complicated. It does not make sense - PHP is the only, and i mean only language i found with comparison rules that are non-transitive. And even worse, circular.

    12. Re:PHP? by narcc · · Score: 1

      It's not an argument. It's speculation as to why it's often compared to C.

      Don't blame me, you asked for exactly that!

    13. Re:PHP? by narcc · · Score: 1

      That's flat-out wrong!

      You'll find that many languages, not just dynamic languages, have comparison rules that are not transitive -- C included -- when you make comparisons between different types.

      Perhaps you should spend less time parroting nonsense you hear on the internet and a bit more time evaluating your beliefs.

    14. Re:PHP? by Lisandro · · Score: 1

      Dude, you are the one who's flat out wrong. Not only C has transitive relationship operators, but the language specification actually states that value comparison operators must be transitive except in cases where precision is lost in type-casting of operands.

      So, for example, this might fool the typical PHP developer...

      int main(void) {
      unsigned long a = 98765UL;
      int b = -12345;
      short c = 1;

      if (a < b) printf("a < b!\n");
      if (b < c) printf("b < c!\n");
      if (c < a) printf("c < a!\n");
      }

      ...while you're simply rounding off (modifying!) operands in the process. This can be easily show by controlling how casting is performed:

      int main(void) {
      unsigned long a = 98765UL;
      int b = -12345;
      short c = 1;

      if (a < (long)b) printf("a < b!\n");
      if (b < (int)c) printf("b < c!\n");
      if (c < (short)a) printf("c < a!\n");
      }

      Compare this to the brainfuck that is PHP, where comparison rules are well stablished but still manage to produce this crap. I can't believe i'm actually discussing this.

    15. Re:PHP? by narcc · · Score: 1

      I can't believe that, in the face of evidence to the contrary, you're holding on to your absurd beliefs.

      Not only C has transitive relationship operators,

      Just like PHP!

      value comparison operators must be transitive except in cases where precision is lost in type-casting of operands.

      Just like PHP, where comparison operators are transitive except in cases where precision is lost in type-casting of operands.

      The difference, of course, is that no one says C's operators aren't transitive even though they behave like PHP's operators once differences in types are taken in to account.

      Now, if had even a minimal understanding of dynamic typing, you wouldn't say such absurd things.

      Look, this is a simple point-of-fact. You can do the experiment yourself, quickly and easily. The results are irrefutable. You've been parroting nonsense. You'll get over it.

    16. Re:PHP? by Lisandro · · Score: 1

      Just like PHP!

      ...sigh...

      Just like PHP, where comparison operators are transitive except in cases where precision is lost in type-casting of operands.

      Yeah. I'm dying to know what the "loss of precision" is when comparing a float to an array to an object.

      No, you know what? I don't. Go have fun with your toy websites.

    17. Re:PHP? by narcc · · Score: 1

      Yeah. I'm dying to know what the "loss of precision" is when comparing a float to an array to an object.

      Gee, I wonder. Converting a non-numeric type to a number... Hmmm...

      Are you really this thick?

      Deny reality all you want. Just do the world a favor and stop spouting nonsense.

    18. Re:PHP? by Anonymous Coward · · Score: 0

      You keep using the word 'precision'. I don't think it means what you think it means.

    19. Re:PHP? by DrGamez · · Score: 1

      Man you get proven wrong in like every conversation thread on this page.
      There has to be some kind of /. cheevo for that.

    20. Re:PHP? by narcc · · Score: 1

      Really? Because it looks like she agreed with me completely.

      You'll find that many languages, not just dynamic languages, have comparison rules that are not transitive -- C included -- when you make comparisons between different types.

      To which she replied:

      Not only C has transitive relationship operators, but the language specification actually states that value comparison operators must be transitive except in cases where precision is lost in type-casting of operands.

      In contrast to her earlier claim:

      PHP is the only, and i mean only language i found with comparison rules that are non-transitive.

      How does that make me wrong again?

    21. Re:PHP? by Lisandro · · Score: 1

      In ways you cannot undersand, evidently. The distinction on C when comparing type-casted operands is precisely because casting is guaranteed to destroy precision - operands are effectively modified in the process. This has NOTHING to do with the way relational operators work: they behave in a sane way, like they do in every other language on Earth.

      Now contrast that with the idiotic PHP decision of setting rules for relational operators leading to circular logic. I know the "this might fool the typical PHP developer" warning went over your head, but ponder on this: on my original PHP code snippet, where's the "loss of precision"?

      Where's the casting?

      Hell, where do you apply your "object has precedence" mantra on it?

      I really can't believe that someone could not only defend this madness so vehemently, but also without really understanding what he/she is talking about. Try a new language, son. It will open your horizons.

      PS: I'm a he, not a she.

    22. Re:PHP? by Xest · · Score: 1

      Watching narcc trying to argue that PHP isn't a bad language is like watching a 3 year old repeatedly trying to ram a square peg into a round hole.

      It's funny at first, but then you feel bad and try and help him, but the problem is this kid's just too dumb to be helped and so he just sits screaming and crying at people instead.

      He's openly admitted previously he has little or no experience using PHP though, and also clearly has no experience with any other languages. In fact, it's hard to tell if he's even a programmer full stop. His inability to recognise bad things in PHP (and Javascript, he's the same with that for what it's worth - he doesn't even understand why variables that haven't been declared with var defaulting to global scope is a bad thing for example) that anyone who has worked with C, C++, C#, Java, or many other languages would spot immediately implies he really has no worthwhile programming experience.

    23. Re:PHP? by narcc · · Score: 1

      He's openly admitted previously he has little or no experience using PHP though

      Evidence? I've said nothing of the sort.

      Then again, it's pretty clear that you're not interesting in facts or reality.

      I love how you can only attack my character with made-up nonsense, it implies that you have no actual argument.

    24. Re:PHP? by narcc · · Score: 1

      Funny, you seem to agree with me completely.

      You'll find that many languages, not just dynamic languages, have comparison rules that are not transitive -- C included -- when you make comparisons between different types.

      To which you replied:

      Not only C has transitive relationship operators, but the language specification actually states that value comparison operators must be transitive except in cases where precision is lost in type-casting of operands.

      Yet you still cling to your laughably incompetent earlier claim:

      PHP is the only, and i mean only language i found with comparison rules that are non-transitive.

      You're clinging to your silly beliefs in light of evidence to the contrary. It's madness.

    25. Re:PHP? by Xest · · Score: 1

      No I actually attacked your argument and ripped it to shreds too, but you obviously missed that, probably because as you prove time and time again - not just to me, but to the so many others who trivially tear your incorrect arguments to shred - you're just not smart enough to understand this topic.

    26. Re:PHP? by Lisandro · · Score: 1

      sigh...

      Whatever kid. You win. I have actual work to do.

    27. Re:PHP? by narcc · · Score: 1

      Evidence? You seem to have trouble providing that for your nonsense claims.

      Go ahead, post a link. I'll wait.

    28. Re:PHP? by Xest · · Score: 1

      It's at the point where I can only assume you're just incapable of reading. It's the only explanation for your inability to see what is repeatedly placed right in front of your face.

      Have you considered literacy classes? I think you're in dire need.

    29. Re:PHP? by narcc · · Score: 1

      Let's see... So far, all you've done is attack my character, with false claims you repeat yet refuse to substantiate, ignore all the evidence placed in front of you, and continue to repeat the same empty rhetoric.

      Sorry, pal. Reality disagrees with you.

      So, are you ready to take me up on my offer? Pick a section of the fractal article you think is particularly good and I'll walk you through it.

      Yeah, I didn't think so. Your unfounded beliefs probably can't stand up to that much reality. (I suspect that this is why you haven't taken me up on the offer. You tried to find a good section and failed. You now know it's crap. You're just too insecure to admit that you were completely wrong about it.)

    30. Re:PHP? by Xest · · Score: 1

      At the end of the day I'm not the one making extraordinary claims, my claims are well grounded, my claims are backed up by well thought through and justified articles like the fractal article.

      On the other side of the discussion we have you, a crackpot who seems to rail against established fact, who rails against well written articles on the topic but who still cannot prove any of what he claims. You say pick a section, okay, I said you can have the whole article to make things easier for you, as that meant you could pick anything but despite me making it easier for you you're still using this as an excuse, so I pick the "Operators" section.

      Of course this is already a section that you've been proven wrong on time and time again, but let's see you continue to be wrong. More than anything I'm just intrigued to see how you spin it now that I'm playing the game the way you want it to be played and still get it wrong.

      Go for it, I'm waiting.

    31. Re:PHP? by narcc · · Score: 1

      I'm curious as to which one of my claims you think is extraordinary? What "established fact" am I "railing against"?

      Can't answer that one either, eh?

      I'm also sitll waiting on proof of your claims about my experience with PHP. You've repeated that one several times without evidence, though I've directly contradicted it.

      Still nothing?

      Okay, on the operators section. I see you DIDN'T do as I requested and strip out the empty rhetoric ahead of time. Pitiful.

      Operators
      == is useless.

      This is the claim. It's obviously not useless as it's essential for dynamic languages. The author starts by immediately showing his ignorance. Still, let's see how he makes his case:

      It’s not transitive. "foo" == TRUE, and "foo" == 0 but, of course, TRUE != 0.
      == converts to numbers when possible (123 == "123foo" although "123" != "123foo"), which means it converts to floats when possible. So large hex strings (like, say, password hashes) may occasionally compare true when they’re not.

      Wrong! == is transitive provided you're not mixing types. As I've pointed out, this is EXACTLY like other languages. Go ahead and pull out your favorite language. You'll find that (after doing the casting yourself) that == is not transitive between types in those languages either!

      You really want to deny this, but it's an obvious fact. Worse, you can easily do an experiment yourself that proves my point! You either refuse to, or you have and know the results. Either way, continuing to deny something this simple and obvious says an awful lot about you...

      For the same reason, "6" == " 6", "4.2" == "4.20", and "133" == "0133". But note that 133 != 0133, because 0133 is octal. But "0x10" == "16" and "1e3" == "1000"!

      This one is a bit debatable. It could be a bug, or intentional behavior as it is often desirable to ignore leading zeros when converting a string to a number. In either case, it's well-documented.

      So, is it better that leading zeros are ignored or not? It's a good question. On one hand, we want the consistency, on the other, octal values are so rarely used that it's likely to cause more problems for beginners and experienced users than the inconsistency.

      Oh, wait. You didn't even know that the point he was making was that octal strings are treated like decimal strings when converted to a number did you? (Judging from his "point" below, neither does he! Oh, shameless ignorance!)

      === compares values and type except with objects, where === is only true if both operands are actually the same object!

      Just like Java. What did he expect? If it behaved differently, he might have a reason to complain!

      For objects, == compares both value (of every attribute) and type, which is what === does for every other type. What.

      Oh, he's just a moron. Sorry, is the author just confused about what objects are and what the purpose of == is? Because the only one confused here seems to be him!

      Comparison isn’t much better. It’s not even consistent: NULL < -1, and NULL == 0. Sorting is thus nondeterministic; it depends on the order in which the sort algorithm happens to compare elements.

      Total fail. The claim here is that Sorting is nondeterministic. This is laughably false (as he unwittingly admits after the semi-colon!). Maybe he just doesn't know what that term means? You'll also note the type conversion which, giving him the benefit of the doubt, he missed. It seems dynamic languages confuse him quite a bit.

      The comparison operators try to sort arrays, two different ways: first by length, then by elements. If they have the same number of elements but different sets of keys, though, they are uncomparable.

      (Ignoring the "try to sort arrays" bit. Let's pretend that this was an honest mistake.) It'

    32. Re:PHP? by Xest · · Score: 1

      "I'm curious as to which one of my claims you think is extraordinary? What "established fact" am I "railing against"?"

      The "PHP isn't badly designed" claim.

      "Wrong! == is transitive provided you're not mixing types."

      Exactly, so it's not transitive then. This is a dynamic language, so if you take your view that you shouldn't mix types with it then it's still broken because you can't mix types with one of it's operators. That means it's bad design whichever way you spin it.

      "You'll find that (after doing the casting yourself) that == is not transitive between types in those languages either!"

      I think you're confusing data loss with transitivity. These are two separate concepts that to the uneducated mind like yours would indeed appear confusing.

      Oh and you missed one:

      "== converts to numbers when possible (123 == "123foo"⦠although "123" != "123foo"), which means it converts to floats when possible. So large hex strings (like, say, password hashes) may occasionally compare true when theyâ(TM)re not. Even JavaScript doesnâ(TM)t do this."

      Onto the follow on:

      "This one is a bit debatable. It could be a bug, or intentional behavior as it is often desirable to ignore leading zeros when converting a string to a number. In either case, it's well-documented."

      It's also bad design because it's not consistent.

      "Just like Java. What did he expect? If it behaved differently, he might have a reason to complain!"

      Except Java doesn't even have an === operator. Presumably you mean it's == operator, and that's widely criticised and hence why C#'s operator overloading was often cited as one of it's superior features compared to Java. The fact it's bad design in Java doesn't somehow make it good design in PHP.

      "Oh, he's just a moron. Sorry, is the author just confused about what objects are and what the purpose of == is? Because the only one confused here seems to be him!"

      No he's saying lack of consistency is bad design. It is.

      "Total fail. The claim here is that Sorting is nondeterministic. This is laughably false (as he unwittingly admits after the semi-colon!). Maybe he just doesn't know what that term means? You'll also note the type conversion which, giving him the benefit of the doubt, he missed. It seems dynamic languages confuse him quite a bit."

      No, it seems the importance of the mathematical property of transitivity confuses you. For someone that claims to be from an academic background you obviously never studied a moment of mathematics, especially as related to computability. If you had, you'd understand the point made here, which you don't.

      "How would this bad?"

      How would it be bad? Well it just doesn't work. You can fairly argue that you shouldn't do this, but if you shouldn't do it then it shouldn't fail silently, it should fail loudly. It's another bit of poor design that allows a developer to accidentally write broken code without ever knowing about it. Other languages either implement things more sanely, or fail loudly. Bad design.

      "Again, how is this bad?"

      Well what's the rationale behind it? A language just doing arbitrary things that may or may not make sense is bad design. Again, they should do something that makes sense, or if they can't do something that makes sense then fail loudly so it can be fixed.

      ""123""0123" returns false. I see you also didn't bother to check even single-line examples, eh? (On the author: Again, wasn't he paying attention to himself earlier?)"

      You've got a few like this, where you "fact checked". You'd look less like a ranting lunatic if when you did your fact checking you checked the version of PHP available at the time the article was written. It's not a living document. A number of things have been fixed off the back of that article and the fact this is true only goes to prove he was right in the first place.

      "Despite the craziness above, and the explicit rejection of Perlâ(TM)s pairs of string and numeric operators, PHP doe

    33. Re:PHP? by narcc · · Score: 1

      I give up. You stick your head in the sand and refuse to face reality.

      I think you're confusing data loss with transitivity.

      No, I'm not. It's VERY obvious that I'm not.

      Look, this isn't even a contentious point. Try it for yourself! PHP doesn't behave any differently here than other languages!

      It's been explained to you, over and over again. Any idiot with 5 minutes of free time can prove this for themselves!

      What can I do, when you write things like this?

      It's bad design again. Languages are tools of logic and the results of it are illogical.

      It's perfectly logical, as the author of your beloved nonsense article explains!

      Then again, this bit tells a different story:

      So now I've tried to help you understand the areas of the document you did not perhaps you can also begin to realise why I made the point I did about your lack of formal development experience.

      Your claim was that I said that I had little experience with PHP -- which you repeated even after I contradicted you. I asked you for evidence on both occasions, and like the troll you clearly are, you ignored.

      I give up. You're clearly just stringing me along here. Enjoy your ignorance.

    34. Re:PHP? by Xest · · Score: 1

      "Look, this isn't even a contentious point. Try it for yourself! PHP doesn't behave any differently here than other languages!"

      You're still just making yourself look sillier and sillier. Most those conversions don't even work in other languages, there's not even a valid cast you can use in many cases precisely for the reason it doesn't make sense. It's kind of hard to try it in other languages when you can't even get to the point of working code in other languages.

      Where you can cast in other languages in a manner where there's not a direct translation you get data loss. I'm not really sure why you find this so difficult to understand, I did think you were coming from a more academic background and your problem was lack of practical experience but it's not even that is it? you don't even have CS101 level knowledge, you're just outright inexperienced full stop.

      "It's perfectly logical, as the author of your beloved nonsense article explains!"

      It's not logical, because it evaluates in a manner that goes against all norms. This is like ignoring the standard order of operation in mathematics, it's like taking an equation like 2 + 7 * 5 - 4 and getting something other than 33. Yes you could evaluate it a different way, but only if you're utterly retarded and don't want to work in a way that the whole of the rest of the world works making you incredibly unhelpful and coming up with results that any informed and intelligent person would deem "wrong".

      But given that's all you could really even begin to try and dispute, and yet again still failed, I shall take it that you've finally accepted deep down that you're wrong, even though you're too pathetic to ever openly admit it. You obviously couldn't even begin to find any argument on the other points, which means you finally accept that you're completely wrong to say the article is nearly all wrong. Obviously it's not, because you couldn't dispute it further once your lack of knowledge was explained to you.

      Still I guess your answer is in regardless, you chose not to listen. You chose to become a wilful liar, rather than an informed individual. I guess that says all that needs to be said about you.

    35. Re:PHP? by narcc · · Score: 1

      Most those conversions don't even work in other languages

      If you can cast an int to a bool, or float to an int, you prove my point. What you find really difficult here is trying to find a way to ignore a simple obvious fact: The == point is complete nonsense. Give it up. Accept reality. I know it's painful for you.

      Where you can cast in other languages in a manner where there's not a direct translation you get data loss.

      You can't. That's a big part of the point! This isn't complicated! What, exactly, are you having difficulty understanding here? That you're wrong?

      It's not logical, because it evaluates in a manner that goes against all norms

      Okay, you're using Dr. Spock's definition of logical. Typical. Are you one of those autodidacts, perhaps? That would explain an awful lot...

      But given that's all you could really even begin to try and dispute

      That's all I bothered to respond to. You're clearly incapable of being educated.

      ou chose to become a wilful liar

      Where did I lie? The only lie told here, was by you. I'm still waiting for you to back up that lie with evidence.

      You know what I think? I don't think anyone could possibly be this incompetent. You're not a moron, your just a troll.

    36. Re:PHP? by Anonymous Coward · · Score: 0

      Okay well, given that we're at the point now where you're simply reiterating the fact that you don't understand relatively low level topics like casting and are implying that it would be bad for one to learn by themselves (although I also completed 2 degrees and have years of professional experience) then I think you've driven us well into nonsense land.

      So enjoy your stay, you obviously like it here, I'm off back to reality. Maybe you could read a book during your stay, one that teaches you basic concepts like why casting can result in data loss, and a value with data loss will never be the same as one with the original data precisely because data has been lost. Perhaps a bit of an understanding of mathematics would help too, the importance of transitivity and why the PHP example isn't a case of data loss causing failure of transitive equality but instead a result of arbitrary conversions that haven't been thought through. Of course you wont do this, in fact you can't, because you've demonstrated clearly your illiteracy and inability to read but maybe someone will help you even though you're basically all alone on this topic only supported by people who openly admit they're straight from amateur land - something you'd probably save yourself a lot of pain over if you dropped the act that you have any professional, or even worthwhile personal experience which we know you don't due to you previously admitting that.

      Oh and er, I don't want to really ruin your fantasy world, but "Dr Spock" isn't a real person, you know, just throwing that out there in case it helps your recovery. Though it is amusing that you would compare someone who believes in the importance of standardisation of precedence of things like mathematical operators to a made up character. I think that speaks volumes about the level of crackpottedness which you have reached, but I guess that's what comes from being a wilful liar.

      Even your inability to understand basic terminology and converse with it is evidence of the fact that you're neither well self-educated, well academically educated, or well professional educated. Long story short, you're basically the village dropout of Slashdot because all attempts at learning you've ever engaged in were a clear failure.

  21. The Next Generation? by mu51c10rd · · Score: 1

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

  22. To be fair... by frank_adrian314159 · · Score: 1

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

    --
    That is all.
  23. Only on paper by Safety+Cap · · Score: 0

    JS is NOT a big contender for PHP, because it isn't the functional equivalent of the double-clawed hammer.

    The unwashed masses gravitate to PHP because it is very easy to get something running and imposes almost no restrictions on the developer. Thus, we get nightmares like phpBB and vBulletin.

    --
    Yeah, right.
    1. Re:Only on paper by dgatwood · · Score: 2

      Personally, I blame the MySQL team for nightmares like phpBB and vBulletin. After all, mysql_query is still available in the language, despite being at fault for a staggering percentage of PHP application security flaws. The PHP folks have at least finally deprecated it in 5.5, and theoretically it will go away in the future, though at this point it is so ingrained that when they do, most folks will just reimplement it using a template-based query, but with no template fields, and we'll be in the same boat as we are now.

      In an ideal world, that function/method should never have existed in MySQL to begin with. But even if we accept that it was unavoidable, the function/method should have been removed from MySQL a decade ago, because even way back then, it was obvious how flawed an API it is. Had they done so, it wouldn't have continued to exist in the PHP bindings, because it wouldn't still have been in the library.

      The rest of the security problems with PHP are, as far as I can tell, pretty much comparable to any other language—improper quoting of content for use in various aspects of HTML output, cross-site scripting bugs, etc.

      BTW, if you want a PHP bulletin board that's more sane, check out JaxBoards, and grab my fork where I rewrote every single database call to use template-based queries. It's a fairly clean design that separates the presentation from the core to a significant degree, and whose database code is fairly straightforward. If you spot any security bugs that I haven't already fixed in my branch, let me know.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  24. DONT FORGET ABOUT HACK by TFlan91 · · Score: 1

    Can't forget about Facebook's hack!!! http://hacklang.org/

    (lol)

  25. NIH Syndrome by Anonymous Coward · · Score: 0

    HHVM and Hack is more than the PHP team will produce even if they're given a decade. But rest assured they definitely won't use it and keep reinventing the wheel, poorly, because of NIH Syndrome.

  26. I'm just fixing a lowest bidder site... by Anonymous Coward · · Score: 0

    ... done in php. To any language/framework that allows what I've seen, I have only one wish: "Please curl in a corner and die."

  27. Re:Ad injection question by Algae_94 · · Score: 1

    I've seen some ads at the bottom of the page even with ads disabled. I think Dice is just working on the big fuck you to disabling ads.

  28. There are others like it but this one is mine. by handy_vandal · · Score: 1

    Made me smile, to see the Rifleman's Creed adapted for new purposes.

    This is my good code / This is my bug
    One is for running / One makes me shrug.

    --
    -kgj
  29. Web is inherently parallel by tepples · · Score: 1

    In a web application, each page view can run on a separate core.

  30. SQL's ternary operator is more beautiful by tepples · · Score: 1

    The difference is that SQL's ternary operator (case when condition1 then value_if_truthy1 when condition2 then value_if_truthy2 else value_if_all_falsey end) has an unambiguous and far more predictable syntax that I find beautiful. Next best would be how ternary operators stack in Python (value_if_truthy1 if condition1 else value_if_truthy2 if condition2 else value_if_all_falsey).

  31. Imaginary numbers, imaginary criticisms by tepples · · Score: 1

    If you're doing complex math with PHP you're doing something horribly wrong.

    Then why does PEAR have a class specifically for complex math?

    1. Re:Imaginary numbers, imaginary criticisms by RyuuzakiTetsuya · · Score: 1
      --
      Non impediti ratione cogitationus.
  32. PEAR by Anonymous Coward · · Score: 0

    I just use PEAR, no need to reinvent the wheel again.

  33. PHP isn't the bottleneck by Art3x · · Score: 1

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