'Is there a downside of using $_REQUEST for all request type?
I am creating an MVC project in PHP and created a Request class for request handling. I want to get parameters by one function. Can I use $_REQUEST directly or need to check something? I could not think of an edge case.
public function getParams($key = "") {
return $key ? $_REQUEST[$key] : $_REQUEST;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
