I have the following test PFP snippet. The output from the echo statement shows that the variable has a value of 1. The output from the function says NUL. I realize I could pass the variable as a function argument. This is just a simple test case to see if global variables are supported. I have a larger project that I'm attempting to move into Woody Ad Snippets that relies on global variables. It'll be a bit of work to modify the code to pass these variables as arguments if that's what I need to do.
$testvar = 1;
function testfunc() {
global $testvar;
var_dump ($testvar);
}
echo "testvar is [$testvar]<br>\n";
testfunc();