13

I don't know .. Why everyone hates PHP ... At this point am too afraid to ask ..

Comments
  • 5
    I love it <3 don't feel alone
  • 1
    I dislike it because it's old and run down, it doesn't support the new ways be browse the Internet. Can you imagine Facebook or Twitter using php.
  • 0
    @liammartens that's cool :D
  • 14
    @Nojil Facebook is built using Php...
  • 2
    @Nojil well Facebook is written in Php only rite
  • 1
    @nblackburn lol u beat me to it ... in seconds .. :-p
  • 1
    Facebook still uses PHP, but it has built a compiler for it so it can be turned into native code on its web servers, thus boosting performance.

    Php is so slow they had to build something to boost its speed, it won't be long before they transition to node
  • 0
    Just to add on here they use hip hop which coverts php into c++ lol because php is so slow
  • 1
    I'm no php dev but I've heard scaling is a big issue. Anyone confirm?
  • 1
    I like PHP.
  • 1
    @xroad yes scaling is a huge issue
  • 2
    it's relatively easy to get started with it, so there's a crap ton of absolutely terrible code written in it
  • 3
    Because PHP stands for Personal Home Page and people try making massive projects out of it.
  • 0
    XCache helps a lot with high loads
  • 4
    @sheeponmeth Nope, it stands for "PHP: Hypertext Preprocessor" which is a recursive acronym because the first word of the acronym is in fact the acronym.
  • 4
    people hate PHP coz once it was bad... now its pretty good and fast and have tone of new things.
  • 6
    Facebook does use PHP and their implementation is of very similar speed to PHP 7 out of the box. It's safe to say PHP 7 is faster or as fast as pretty much any scripting language.

    I can see reasons to dislike PHP, but speed is not a good reason.
  • 1
    Php really allows someone to write horribly maintained code. Namespaces, classes, interfaces, no "common" knowledge way to put it all together.
  • 1
    Maintainable is what I meant. I am really learning to hate php after working in django and express on a few projects over the last 10 months.
  • 0
    @benleah Indeed it was
  • 5
    @avstuff That's not entirely the languages fault, anyone can write horrible unmaintainable code in any language.
  • 1
    @nblackburn it seems like it's easier to write bad code in some languages more than others
  • 3
    @xroad Yes but by that very notion it's also easy to write good code.

    Php is far from perfect but it doesn't suck nearly as much as people are making it out.
  • 6
    Yeah I feel like you can write bad code in any language and it's easy in any language. Even in a strictly typed compiled language like Java, it's easy to write bad code. Trust me, I've done it!
  • 5
    I've personally written shit code in VB Script, PHP, VB.Net, C#, SQL and hell, while we're at it, I've written some garbage CSS too.
  • 5
    shit guy writes shit codes no matter which language
  • 5
    Still accounts for 82% of websites. I write shit code all the time and php pays my bills.
  • 3
    Some people hate PHP for seceral reassons.

    1-Relatively easy language and stack to learn without even being a software engineer.

    2- Huge amount of mediocre self-called Php developers out there writing extremely bad quality software.

    3-People don't differentiate the language from the stack. Php is a language and that is about it. The other part is the platform where it rums.and people blame incorrectly php on scalability/performance issues when those are problems of platform instead of the language. Php can be as fast as C if we write a compiler for it.

    Etc..etc...etc..
  • 4
    The biggest problems with php aren't that there's lots of crappy devs writing crappy code or that the language isn't scalable (php7 fixes a lot of the bad).
    Lots of the issues are more to do with mystery meat syntax and halfway implemented structures which only seem to encourage bad code (I'm looking at you traits). So much mud is slung at php for no reason at all by people in the tech industry who've never even used it that it just sort of turns into a bogeyman. It's not really that bad.
    For those who want truthful examples of why php is bad - https://eev.ee/blog/2012/...
  • 0
    @sledgehammer ah, you beat me to it
  • 1
    My reason for disliking PHP is that its language specification isn't actually formally standardised. There is one reference implementation of PHP, the Zend engine. And I think the HHVM (Hip Hop Virtual Machine) from Facebook does it's best to implement the same thing, they've had to reverse engineer the standard and if the Zend engine changes how it does something then that changes the php language which means for better or worse to maintain compatibility HHVM will have to do the same thing.

    I believe an effort started in 2014 to begin to document and standardise the language, but I don't know if that was completed and if so what standards body ratified the language.

    My frustrations stem from this, I used PHP occasionally and found it annoying as hell to look up functions that their documentation just said "and this fails with an error" but what kind? How best should I handle it? Does it give me non zero or an exception?

    So that's my personal gripe.
  • 1
    @nmunro Now there are PSR standards . And with the use of frameworks like Symfony and Guzzle we can work out scaling .
  • 1
    @darkprince A quick look at the PSR standards do not seem to suggest there is a governing body that stewards the language independent of any one particular implementation of it.

    For instance Python has an independent foundation that designs and specifies a language and while they offer an implementation others can easily implement the standard. ECMA steward the JavaScript standard. ANSI govern C and so on.

    My concerns are that PHP isn't as open and transparent as it should be, a lot of the issues related to speed and scalability could be addressed if there was a common spec others could program to and compete to out perform.

    As it stands whatever the Zend engine does is the standard, and I just don't like that.

    Having said that, I'm the weirdo that has a PDF download of the JavaScript standard to understand exactly what goes on under the hood, so maybe I'm a little bit weird. I'm more than comfortable to admit that.
Add Comment