Values from $node object in Views Contexual Filter I'd like to create a PHP contexual filter for a view.

This code isn't right, but I want something like this:

global $node;
if ($node-&gt;type=="ABC") {
return 5880;
}

if ($node-&gt;type=="XYZ") {
return 6200;
}


How do I access the $node object in a PHP contexual filter? 

Also, is there a better way to debug/troubleshoot this? I feel like I'm operating in complete darkness.
You can access the $node object by doing this in the filter:

$node = menu_get_object()