HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //usr/share/pear/test/pecl_http/tests/envrequestheader001.phpt
--TEST--
env request header
--SKIPIF--
<?php include "skipif.inc"; ?>
--POST--
a=b
--ENV--
HTTP_HOST=foo.bar
HTTP_ACCEPT=*/*
--FILE--
<?php

var_dump(http\Env::getRequestHeader("nono"));
var_dump(http\Env::getRequestHeader("Host"));
var_dump(http\Env::getRequestHeader("content-type"));
$hdr = http\Env::getRequestHeader();
ksort($hdr);
var_dump($hdr);
?>
--EXPECTF--
NULL
string(%d) "foo.bar"
string(%d) "application/x-www-form-urlencoded"
array(4) {
  ["Accept"]=>
  string(3) "*/*"
  ["Content-Length"]=>
  string(1) "3"
  ["Content-Type"]=>
  string(33) "application/x-www-form-urlencoded"
  ["Host"]=>
  string(7) "foo.bar"
}