RE: [PHP-DEV] Calling symbol table patch

From: Date: Sun, 19 Nov 2000 22:48:52 +0000
Subject: RE: [PHP-DEV] Calling symbol table patch
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-38717@lists.php.net to get a copy of this message
> I'd even rename the function to get_symbol_table() assuming it hasn't > been there long enough. The original purpose of the function as I created it was simply to output debug information, therefore: var_dump(get_defined_vars()); Was easier than: var_dump(array_keys($GLOBALS)); var_dump(get_defined_vars()); And the debug output was a bit nicer too. The way I see it there are a few options --> 1) Keep with my patch. This will not be so bad as long as you define "current" as the first argument. 2) Modify it so that the contents of variables in the current scope are returned, but not variables in the global scope. (this sucks imho) 3) Break compatibility. The get_defined_vars() and get_defined_functions() functions have not (to my knowledge) been formally announced, therefore I don't think it will be killer to break compatibilty in get_defined_vars() and have it simply return the current scope. (I like this the best) I also don't think it should be get_symbol_table() since if I'm the average user I know what a variable is but a symbol table, is that like some weird Perl thing? :) -Sterling

« previous php.dev (#38717) next »