• Johnnyvibrant@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    Twig is easier for security, everything is sanitised by default. Also helps to separate your view layer from your logic.

    Think about how Wordpress goes about it, mixed logic and views and needing to wrap everything in an esc html, esc attr or whatever else other functions they have available because they decided to go the native php route.

    Twig has a valid role to play in php web dev I reckon.

    • meowmeow@quokk.au
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      That was over a decade ago. Use modern PHP. Wordpress always did it WRONG anyway.