Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-dump

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  dump   Lines 275-350 (75 lines)???: 1969-12-31 file  utilsDebug.php   Last mod: Mon 2021-05-03 17:55:24

function dump $a=''$r=2$prt=true )
        {
#-k     debug   print   trace
#-d                     4/7/12  - returns output str
#-      only use dump if it's an array or you're dumping global values
#-      $prt:   true, also pass-thru to prt
#-              false, return output as a string
#-      $r:     0:      pass-thru command to prt
#-              1:
#-              2: (default)
        
global $logfcb;

        
$ar callingVars );
        
$nm $ar[0]['name'];

        
$typ is($a);
if (
strlen($nm)  &&  !strpos(' '.$typ,'array'))
                {       
# something, but not an array
                
if (strpos(' '.$typ,'null'))
                        {
                        
$out 'Non-existant array (' $nm ')';
                        }
                else
                        {
                        
$out 'wrong type (' $nm ' is ' $typ '); dump -> prt' "<br>\n" $a;
                        }
                if (
$prtprt $out$r );
                return 
$out;
                }

        if (!
strlen($nm))
                {       
# dump all variables
                
$nm .= ' -> ' '$GLOBALS ';
                if (isset(
$logfcb['log']['f']))
                        {
                        
$defs get_defined_constants(true);
                        
$defs $defs['user'];
                        
$out $nm .
                        
print_r($GLOBALS,               true) .
                        
"\n ========== Defined variables ========== \n" .
                        
print_r(get_defined_vars(),     true) .
                        
"\n ======= User-defined constants ======== \n" .
                        
print_r($defs,                  true) .
                        
"\n " .
                        
dumpFunctions();
                        }
                else
                        {
                        
$out '<br><hr><b>' $nm '</b><br><br>' stackPlace() . '<pre>' .
                        
print_r($GLOBALS,               true) .
                        
'<br><hr><br> ========== Defined variables ========== ' .
                        
print_r(get_defined_vars(),     true) .
                        
'<br><hr><br> ======= User-defined constants ======== ' .
                        
print_r($defs,                  true) .
                        
'</pre><br>' .
                        
dumpFunctions();
                        }
                }
        else
                {       
# dump an array
                
if (isset($logfcb['log']['f']))
                        {
                        
$out 'Dump: ' $nm .
                        
"\n" print_r($a,true);
                        }
                else
                        {
                        
$out '<b>' callingPath() . $nm '</b><br><br>' .
                        
'<pre>' "\n" print_r($a,true) . '</pre><br>';
                        }
                }

        if (
$prtprt $out$r );
        return 
$out;
        }

?>