What is the significance of PHP's PSR-7?

isn"t it web server (nginx,Apache) to handle request headers and request lines?

Why does psr-7 define several interfaces that handle request headers and request lines?

in which scenarios will php receive the original http message directly for processing? And even if it is handled directly, it is usually handled with hyperglobal variables such as $_ SERVER.

Mar.22,2021

of course it makes sense.
you don't think you need it, and most of the time the framework does these things for you.
Let me give you a few examples

  • how to determine whether it is an ajax request or whether http header information is required
  • how can I tell if the request is post, get, or put?
  • how to set cookie

it's true that a lot of things can be achieved without these standards, but why do we say interface-oriented programming is that we can use it well without knowing the implementation details.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e966fc-47395.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e966fc-47395.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?