File this in the "I've googled this question before and always have a hard time finding it so I'll put it on my site with the right keywords" category.
When you ssh into a Unix, Linux, or BSD system and have a command prompt, but nobody told you what operating system the machine is running, you can get most of the information you need with this:
uname -a
Thanks to James Walker for the reminder.
If you want to find out what variables are defined in the current scope during PHP execution, you can use the get_defined_vars() function. This is particularly useful when working in Drupal's .tpl.php files where you want to see what variables are getting passed into the template file.
var_dump(get_defined_vars());
I somehow have a mental block with this function name and usually end up searching for it with terms like "show available variables in PHP", which isn't very helpful, except from now on, when I search for that on Google, I'll get this post to remind me ;-)
See also get_defined_vars(), get_defined_constants() and get_defined_functions().



