i was thinking of a 2 ways to write a new debug function, ...
1. debug all variables in php script, e.g. "function debug( all )"
which should parse the whole source code of a particular php-script for all
occuring variables and treat them corresponding to their variable type, e.g.
- simple one-dimensional variables like int, float, string,... should be
printed as key = value pairs.
- arrays could be printed with the built-in print_r function
=> has anybody done this already? do you have any conclusions?
2. debug specified variable(s) only, e.g. "function debug( var, var2, var3,
But the problem is to pass the parameters in the right way to get the needed
information and afterwards treat the passed function input to dynamically
print the output.
when i tried to pass, e.g. the variable $_SERVER['SERVER_NAME'] to my debug
function, it was totally confusing, if the variable should be
a) passed as $param, without using any quoting, like:
b) passed as string, using single ticks, like:
c) passed as string, using double quotes, like:
and on the other hand, how to retrieve the passed function input, to write
output, like e.g.
$_SERVER['SERVER_NAME'] = www.remslakecity.de
every time i tried, my only output was,
$_SERVER['SERVER_NAME'] = $_SERVER['SERVER_NAME']
www.remslakecity.de = www.remslakecity.de
=> where can i see the source-code of the phpinfo() function, maybe there is
hint of how to do it?
=> is there a "conversion from string to variable", if "$var" was passed as
=> after passing "$var" as variable it is evaluated on-the-fly, so i can' t
get the $key (varname)
afterall, if my explanation was too confusing, ....
i only want to write the varname once, like debug (var) and to retrieve the
$var = value pair !!!
thanks a lot for helping me out,... me, myself & i, we completely lost our
please mailto:[EMAIL PROTECTED]
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php