Re: get_defined_vars in all scopes?
| From: | Anguz | Date: | Mon, 28 Feb 2005 01:52:33 +0000 |
| Subject: | Re: get_defined_vars in all scopes? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209564@lists.php.net to get a copy of this message | ||
John Holmes wrote:
I see. Thank you John. Many functions may end at different places, they not alway reach the end, so I guess I could do it globalizing every var/arr, at least the ones I'm most interested in. Is there some program I can use that'll monitor the vars when executing the script? I think Xdebug [http://xdebug.org/] does that with functions, but am not sure if it'll work with vars. Thx. :) Cristian LavaqueI'm using this at the end of a script echo '<pre>'; var_dump(get_defined_vars()); echo '</pre>'; but it only returns what get_defined_vars gives, which is what's available in the current scope. Is there any way to get also the vars used in functions that weren't globalized?No, not unless you call this in the functions, also. The variables don't exist after the function is completed. ---John Holmes... UCCASS - PHP Survey System http://www.bigredspark.com/survey.html