Given the following code:

<script language="php">

  function function1() {
    global $bob;
    echo "Bob = $bob\n";

  function function2() {
    $GLOBALS[bob] = "Joe Bob Briggs";


function1() can echo out the value of $bob because it is
added to the global namespace in function2().  Is it possible
for function1() to access the variables that were defined in
the function2() namespace?  Like some sort of "limited"
global or something?  Something to allow called functions
access to the variable namespace of the calling function?


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to