docs: replace mixed in system/HTTP/IncomingRequest.php#7355
docs: replace mixed in system/HTTP/IncomingRequest.php#7355kenjis merged 4 commits intocodeigniter4:developfrom
mixed in system/HTTP/IncomingRequest.php#7355Conversation
mixed in *system/HTTP/IncomingRequest.php*mixed in system/HTTP/IncomingRequest.php
| * @param array|int|null $flags Option | ||
| * | ||
| * @return mixed | ||
| * @return array|bool|int|object|null |
There was a problem hiding this comment.
Why? Basically the value is a string, and an array if $index is an array.
It can get $filter, so FILTER_CALLBACK can return any type value.
https://www.php.net/manual/en/filter.filters.misc.php
It seems the return type is array|bool|float|int|object|string|null.
There was a problem hiding this comment.
Any get*() method return type is the same?
There was a problem hiding this comment.
Any
get*()method return type is the same?
I don't know yet, get*() only fetches from here
https://github.com/totoprayogo1916/framework-CI4/blob/d239b2a09188b1c28e7ed44a38e0f240216be00a/system/HTTP/RequestTrait.php#L242-L248
There was a problem hiding this comment.
Any get*() method return type is the same.
dd($this->request->getGetPost('test', FILTER_VALIDATE_FLOAT));Navigate to http://localhost:8080/?test=1.11 and I got:
$this->request->getGetPost(...) double 1.11
The return type of fetchGlobal() also should be array|bool|float|int|object|string|null.
Co-authored-by: kenjis <kenji.uui@gmail.com>
Description
See #6310
Checklist: