array_key_exists
laravel/octane
Supported Versions: PHP 4 >= 4.0.7, PHP 5, PHP 7, PHP 8
Checks if the given key or index exists in the array
Alias
key_exists
array_key_exists
(
string
|
int $key
, array
$array
):
bool
protected function
correctHeadersSetIncorrectlyByPhpDevServer
(array
$headers
): array
{
if (
array_key_exists
(
'HTTP_CONTENT_LENGTH'
,
$headers
)) {
$headers
[
'CONTENT_LENGTH'
] =
$headers
[
'HTTP_CONTENT_LENGTH'
];
}
src/Swoole/Actions/ConvertSwooleRequestToIlluminateRequest.php
$headers
[
'CONTENT_LENGTH'
] =
$headers
[
'HTTP_CONTENT_LENGTH'
];
}
if (
array_key_exists
(
'HTTP_CONTENT_TYPE'
,
$headers
)) {
$headers
[
'CONTENT_TYPE'
] =
$headers
[
'HTTP_CONTENT_TYPE'
];
}
src/Swoole/Actions/ConvertSwooleRequestToIlluminateRequest.php
protected function
getReasonFromStatusCode
(
int $code
): ?
string
{
if (
array_key_exists
(
$code
,
self
::
STATUS_CODE_REASONS
)) {
return
self
::
STATUS_CODE_REASONS
[
$code
];
}
src/Swoole/SwooleClient.php