Created
February 11, 2020 16:31
-
-
Save andrei-coelho/8e2980bcd2af53f82247e5637a30cd59 to your computer and use it in GitHub Desktop.
to get headers sent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$result = ""; | |
foreach($_SERVER as $K => $V){ | |
$a = explode('_' , $K); | |
if(array_shift($a) == 'HTTP'){ | |
array_walk($a, function(&$v){ | |
$v = ucfirst(strtolower($v)); | |
}); | |
$result .= join('-',$a).": ".$V."<br>"; | |
} | |
} | |
echo $result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment