array_diff_key

Supported Versions: PHP 5 >= 5.1.0, PHP 7, PHP 8
Computes the difference of arrays using keys for comparison
<?php array_diff_key(array $array, array ...$arrays): array
<?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]);

        }