You are here

function _caseless_remove in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/functions.php \GuzzleHttp\Psr7\_caseless_remove()

@internal

1 call to _caseless_remove()
modify_request in vendor/guzzlehttp/psr7/src/functions.php
Clone and modify a request with the given changes.

File

vendor/guzzlehttp/psr7/src/functions.php, line 787

Namespace

GuzzleHttp\Psr7

Code

function _caseless_remove($keys, array $data) {
  $result = [];
  foreach ($keys as &$key) {
    $key = strtolower($key);
  }
  foreach ($data as $k => $v) {
    if (!in_array(strtolower($k), $keys)) {
      $result[$k] = $v;
    }
  }
  return $result;
}