Php is amazing. ☺

  • 18
    Dynamic typing appears to suck donkey balls. And for such reasons, I have no idea beyond "ooh, shiny" why PHP gets hate while JS gets love.
  • 3
    @d4ng3r0u5 neither python nor java script has this issue though. Running that in both languages will produce false
  • 9
    @oneinazillion13 actually in This case the problem ist definitely PHP
  • 0
    (friendly reminder that this problem doesn't occur in Python and JS and if you really hate dynamic typing both have static typing compatibility)
  • 1
    Who uses md5 btw?
  • 12
  • 10
    Yeah, bashing PHP with "==" use instead of "===" and using "md5" which everybody knows is deprecated... Haha so funny and soooOOooo original.
  • 3
    I just come here to look at the salty comments. Only developers can get so irritable over a post pointing out an obvious flaw. 😂😂
  • 1
    This is a follow-up to the original tweet btw, for those interested:

  • 7

    I'll take you up on this one.

    Weak typing sucks. I am originally a Haskell dev, working on aerospace & chem applications -- I love my types.

    What does dynamic typing offer? Shortcuts. Less code to write. (Of course we have replaced typing systems with unit tests in those cases... but they are hardly mandatory).

    Strongly/thoroughly typed languages such as Haskell and Rust are slow to develop in. Excruciatingly slow!

    They are not prototyping languages. They are not Ruby, Python, PHP or Javscript -- you can't easily poop out a versatile web backend in an afternoon.

    So why is PHP more hated than JS? Both are weak after all! JS is even weaker than PHP...

    It's because languages aren't one-dimensional, it's not just weak vs strong.

    It's because PHP is BOTH rigid and brittle, while JS is soft and malleable.

    Strongly typed languages might be beautiful strong unyielding Marble, but for quick mockups Clay is still more useful to a sculptor than brittle Limestone.
  • 2
    @bittersweet this guy gets it.
  • 2

    And to extend the material analogy:

    No sculpting substance is absolutely superior (yet?).

    Some are inferior for almost all purposes, and have been phased out. Basic is like cardboard, Fortran is like asbestos -- pays well, but bring your respirator.

    Some seem superior for a while, but have surprising drawbacks. Don't build a whole skyscraper out of clay... at least not the foundation.

    We have not even scratched the surface of what is possible. Golang, in my opinion, is like 3D-printed plastic. Not the best type system, sometimes it breaks, but it's both rapid, relatively strong and quite versatile.

    Many languages are shifting. Java was concrete -- uglier than marble, but such a strong and mature standard language.

    Yet people aren't "done" -- Kotlin has evolved out of Java to give it a bit of that JS malleability while mixing in some tough Scala, Groovy and C#-fiber.

    We're trying to build space elevators... and it takes time to invent our carbon nanotube languages!
  • 2
    @bittersweet oh my it’s like I’m reading word porn
  • 0
    Why are some people here bitching about md5? The hashing algorithmus you use in this example does not matter at all...
  • 0
    And JS has some real silly == conditions that "don't make sense". Welcome to programming.
  • 0
    @UnDeAdYeTii At least with JS's == the madness makes more sense than "these strings start with 0e so therefore we cast them to floats and because they contain non-number we can't parse them so let's just make it 0".

    Type juggling is one hell of a drug
  • 0
    @bigus-dickus you know there are reasons to use md5 that don't involve password hashing.
  • 1

  • 0
    @VinzuSama md5 is deprecated. But not everybody knows it. Or some don't care. Let's remember there are still people out there who email you a plain text password when you forget it! And even more who watch "how do I make a login system safe?" Videos from 10 years ago, use MD5, no salt, and call it good until they get hacked.

    Md5 should never be used anymore. But unless you can purge it from the internet, this is semi relevant.
Add Comment