Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Created September 29, 2018 01:09
Show Gist options
  • Select an option

  • Save AhmedHelalAhmed/782914bdbca30e125a5626c19e24b843 to your computer and use it in GitHub Desktop.

Select an option

Save AhmedHelalAhmed/782914bdbca30e125a5626c19e24b843 to your computer and use it in GitHub Desktop.
info for server
<?php
$length_array = array();
var_dump($_SERVER);
foreach ($_SERVER as $key => $value)
{
$length = strlen($value);
$length_array[$key] = $length;
echo '<pre>';
print_r($key . " = " . $length . " characters");
echo '</pre>';
}
$max_key = array_keys($length_array, max($length_array));
print_r($max_key . " is longest with " . max($length_array) . " characters");
?>
@AhmedHelalAhmed
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment