Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Dump the PHP $_SERVER variable for testing.
//navigate to /?test=1 to view the $_SERVER variables
//be sure to remove this code when finished
if(!empty($_REQUEST['test'])) {
echo "<pre>";
echo "</pre>";

This comment has been minimized.

Copy link

@TrevorLeeman TrevorLeeman commented Sep 29, 2019

This also works for $_SERVER dump without bothering with URL param.

   foreach($_SERVER as $key => $value){
      echo "<tr><td>" . $key . ":</td><td>" . $value . "</td><tr>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment