• Oth@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    4 months ago

    Tell me you’ve never used PHP without telling me you’ve never used PHP.

    It’s known for giving a complete stack trace, it’s nearest neighbours and their god damn grandkids the moment it so much as coughs up a warning. For the longest time it was notorious for doing this as the default error logging level.

    I’m aware it’s cool to hate on PHP, but it has plenty of things to dislike without straight-up inventing nonsense.

    • pixelscript@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 months ago

      PHP stack traces are effectively identical to Java’s in every metric I’m concerned about.

      If you get them sensibly in a log file, anyway. If you allow PHP to render this god awful fugly table inline with your page? Well, have fun. Yes, all the same info is there, and on paper it’s organized in an easier to read format. But oftentimes the table will collide with and mangle with other elements and styling on your page, making the trace irritating or impossible to read.

      This isn’t much of a problem of course, because aforementioned log file is absolutely the way to do it in the first place, and PHP lets you. And hey, absolutely obliterating your page DOM in strange and exciting ways on error sounds like a fantastic way to ensure errors get caught and addressed in testing, so even the unpredictable mangled DOM bullshit is useful in its own way.

      But if someone wants to dunk on PHP for at least outwardly appearing to promote trying to debug it with these awful stack trace tables, I think that’s a well-earned roasting.