I just want to confirm that the following will NOT work:
function f1(){
$test = 'hello';
f2();
}
function f2(){
global $test;
echo $test;
}
f1(); //expected result 'hello'
http://php.net/manual/en/language.variables.scope.php
Is there no way to just "flow" up the scope chain like you can do in Javascript? From the manual, it seems that my option for this is global or nothing at all.
I just wanted to know if that was correct.