TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Is there a function to list all "active" variables (http://www.talkphp.com/absolute-beginners/2893-there-function-list-all-active-variables.html)

Dave 06-03-2008 09:25 PM

Is there a function to list all "active" variables
 
Just a small question, I think.

Is there a PHP function or language feature that allows one to generate a list of all "active" PHP variables ($...)?

By "active," I mean variables that are currently in memory and can be accessed.

Thanks
Dave

xenon 06-03-2008 09:53 PM

Yes, get_defined_vars. Not sure what you need this for...but there you have it :-)

Dave 06-03-2008 10:09 PM

Thank you for your fast reply! I look forward to taking a look at get_defined_vars!

Dave

Dave 06-05-2008 04:03 AM

Thanks again for the get_defined_vars() pointer. Of course, it displays ALL variables, while I just wanted to see my variables.

I managed to find a script that allows the user to set which type of variables to display, so "problem solved." ^^

Dave


All times are GMT. The time now is 02:30 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0