[PHP-DEV] Getting ahold of calling symbol table From: Andrei Zmievski (andrei <email protected>)
Date: 11/20/00

I've run into a few situation where I needed to know values of variables
as they existed in the outer calling scope. Having failed to locate a
way to do it generically I came up with the attached patch. It changes a
couple of things in Zend and implements a get_calling_symbol_table()
function.

<?
foo();

function foo()
{
    $bar = 5;

    bar();
}

function bar() {
    var_dump(get_calling_symbol_table());
}
?>

Results in:

array(1) {
  ["bar"]=>
  int(5)
}

If no one objects, I'd like to go ahead and commit it.

-Andrei
* There is no knowledge that is not power. *

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>