• Fonzie!@ttrpg.network
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    For me the answer is “Building backend applications with it instead of CLI applications, like Lerdorf intended.”

    But also "\n" because it’s easier and PHP_EOL is just an alias for "\n"; it’s not even platform-dependent.

    • Rikudou_Sage@lemmings.world
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      PHP_EOL depends on your host system, it’s \r\n on Windows.

      I don’t really want to use what Lerdorf intended, PHP <= 4 was horrible, 5.x was mainly getting slowly rid of nonsense and with 7.x PHP started its slow path of redemption and entered its modern era.

      While Lerdorf’s vision was great at that time for its intended use case, I wouldn’t want to build anything serious in it.

      • Fonzie!@ttrpg.network
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        It actually outputs "\n" on a Windows system, but modern Windows to recognise that as enough of a newline, nowadays.

        I don’t really want to use what Lerdorf intended, PHP <= 4 was horrible

        Actually a great point!