1 | <?php |
||
12 | trait FormTrait |
||
13 | { |
||
14 | /** |
||
15 | * Insert content into all POST forms. |
||
16 | * |
||
17 | * @param ResponseInterface $response |
||
18 | * @param string $input |
||
19 | * |
||
20 | * @return ResponseInterface |
||
21 | */ |
||
22 | private function insertIntoPostForms(ResponseInterface $response, $input) |
||
45 | |||
46 | /** |
||
47 | * Check whether the request is post (or any similar method). |
||
48 | * |
||
49 | * @param RequestInterface $request |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | private function isPost(RequestInterface $request) |
||
66 | } |
||
67 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: