note 12233 deleted from function.get-defined-vars by sniper
| From: | sniper@php.net | Date: | Sat, 23 Aug 2003 00:07:47 +0000 |
| Subject: | note 12233 deleted from function.get-defined-vars by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54897@lists.php.net to get a copy of this message | ||
Note Submitter: eblade@blackmagik.dynup.net
----
Unfortunatly, I don't have PHP 4.0.4, and don't have access to compile it on my machine.
But, it seems that between this function, serialize/unserialize, and the use of variable variables,
it would be almost trivial to implement a very configurable state-saving system. I would find it
rather useful to be able to store one specific variable out of one specific source file, and be able
to load that back in.. or even all the variables from a source file, to resume a specific state. I
would implement something like:
a database table that would contain all potentially useable variables.. have a function, say,
save_variable($varname) that would automatically hit that database, insert/update a key called
$PHP_SELF/$varname with the serialize()'d version of it's value.. then have a
restore_variable function that would un-do it, and load it right back into it. Or, am I being
stupid and this is already in here? Hmm.