array_keys

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return all the keys or a subset of the keys of an array
<?php array_keys(array $array): array
<?php         $expectedHeader = array_map(function (string $value, string $key): string {

            return $key . '=' . urlencode($value);

        }, $expected, array_keys($expected));

        $this->assertEquals(implode('; ', $expectedHeader), $this->event->getHeaders()['cookie'][0] ?? '');

    }
<?php         $expectedCommonVariables = array_merge($expectedCommonVariables, $overriddenKeys);

        self::assertArraySubset($expectedCommonVariables, $response['$_SERVER']);



        $keysToRemove = array_keys(array_diff_key($expectedCommonVariables, $overriddenKeys));

        foreach ($keysToRemove as $keyToRemove) {

            unset($response['$_SERVER'][$keyToRemove]);

        }
<?php             'errorType',

            'errorMessage',

            'stackTrace',

        ], array_keys($invocationResult));

        $this->assertEquals($errorClass, $invocationResult['errorType']);

        $this->assertEquals($errorMessage, $invocationResult['errorMessage']);

        $this->assertIsArray($invocationResult['stackTrace']);
<?php             'errorType',

            'errorMessage',

            'stack',

        ], array_keys($invocationResult));

        $this->assertEquals($errorClass, $invocationResult['errorType']);

        $this->assertEquals($errorMessage, $invocationResult['errorMessage']);

        $this->assertIsArray($invocationResult['stack']);
<?php                 'errorType',

                'errorMessage',

                'stack',

            ], array_keys($error));

            $this->assertEquals($previousErrors[$index]['errorClass'], $error['errorType']);

            $this->assertEquals($previousErrors[$index]['errorMessage'], $error['errorMessage']);

            $this->assertIsArray($error['stack']);
<?php             'errorType',

            'errorMessage',

            'stackTrace',

        ], array_keys($invocationResult));

        $this->assertEquals($errorClass, $invocationResult['errorType']);

        $this->assertEquals($errorMessage, $invocationResult['errorMessage']);

        $this->assertIsArray($invocationResult['stackTrace']);
<?php             'errorType',

            'errorMessage',

            'stack',

        ], array_keys($invocationResult));

        $this->assertEquals($errorClass, $invocationResult['errorType']);

        $this->assertEquals($errorMessage, $invocationResult['errorMessage']);

        $this->assertIsArray($invocationResult['stack']);