• araozu@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    I’d say that PHP allows you to write very bad code (and makes that the default). It’s a language feature.

    For example Java has a lot of NullPointerException because it was designed with null and without mechanisms to detect & prevent these errors. Any method can return null and cause a NPE. It’s just easy to ignore them. Modern languages like Go, Rust or Zig force you to handle null errors, and make it easy to do so. NPEs are a lasguage feature in Java.

    In the same way PHP allows you to write any ugly code you want. There are no checks, no safety. People can write bad code, people can be lazy, people can be stupid. PHP allows it and empowers them.