/**
* void debug ( mixed Var [, bool Exit] )
*
* Carlos Reche
* Jan 14, 2006
*/
if (!function_exists("debug")) {
function debug($var, $exit = false) {
echo "\n";";
if (is_array($var) || is_object($var)) {
echo htmlentities(print_r($var, true));
}
elseif (is_string($var)) {
echo "string(" . strlen($var) . ") \"" . htmlentities($var) . "\"\n";
}
else {
var_dump($var);
}
echo "
if ($exit) {
exit;
}
}
}
[PHP] Debug function
CYobY- Administrator
- Mesaje : 197
Data de inscriere : 04/10/2009
Varsta : 30
Localizare : VASLUI
- Mesaj n°1
[PHP] Debug function
|
|