Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Replace all occurrences of the search string with the replacement string
<?php str_replace(    array|string $search,    array|string $replace,    string|array $subject,    int &$count = null): string|array
<?php         $results = [];



        foreach ($headers as $key => $value) {

            $key = strtoupper(str_replace('-', '_', $key));



            if (! in_array($key, ['HTTPS', 'REMOTE_ADDR', 'SERVER_PORT'])) {

                $key = 'HTTP_'.$key;