WordPress.org

Plugin Directory

Changeset 672542


Ignore:
Timestamp:
02/24/13 13:48:59 (14 months ago)
Author:
askapache
Message:

Improved Global Variables in Scope output

Location:
askapache-debug-viewer
Files:
21 added
2 edited

Legend:

Unmodified
Added
Removed
  • askapache-debug-viewer/trunk/askapache-debug-viewer.php

    r657076 r672542  
    77 * Author: askapache 
    88 * Contributors: askapache 
    9  * Version: 2.7 
    10  * Updated: 01/22/2013 
     9 * Version: 2.8 
     10 * Updated: 02/24/2013 
    1111 * Requires at least: 3.1.0 
    12  * Tested up to: 3.5 
    13  * Tags: debug, debugging, error, errors, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 
     12 * Tested up to: 3.5.1 
     13 * Tags: debug, debugging, error, errors, issue, help, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 
    1414 * WordPress URI: http://wordpress.org/extend/plugins/askapache-debug-viewer/ 
    1515 * Author URI: http://www.askapache.com/ 
     
    20322032            $val=$GLOBALS[$v]; 
    20332033            $gtype=gettype($val); 
    2034             $out='$'.$v.' ('.$gtype.') '.(!empty($val) && ($gtype=='string'||$gtype=='integer') ? htmlspecialchars($val) : ''); 
    2035             if($gtype=='boolean')$out.=($val===true ? 'true' : 'false'); 
    2036             echo $out."\n"; 
    2037         } 
    2038         $this->print_var_dump(array('authordata'=>$authordata)); 
    2039  
    2040         $this->t(__FILE__,__CLASS__,__FUNCTION__,__LINE__,'',5); 
    2041          
    2042         return '<pre class="aa_pre2">'.ob_get_clean()."\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n".'</pre>'; 
     2034            if($gtype=='NULL'|| ( in_array($gtype,array('string','float','double','integer','array')) && empty($val)) ) continue; 
     2035            $out='$'.$v.' ('.$gtype.(in_array($gtype,array('string','array'))?'':') '); 
     2036            //ISCLOG::epd(array($gtype)); 
     2037             
     2038            switch($gtype) 
     2039            { 
     2040                case 'float': 
     2041                case 'double': 
     2042                case 'integer': $out.='= '.htmlspecialchars($val); break; 
     2043                 
     2044                case 'boolean': $out.='= '.($val===true ? 'true' : 'false'); break; 
     2045                 
     2046                case 'resource': $out.='= '.get_resource_type($val); break; 
     2047 
     2048                case 'string': $out.='#'.strlen($val).') = '.htmlspecialchars($val); break; 
     2049                case 'array': 
     2050                    //$n6=substr( preg_replace('/\s\s+/', ' ', str_replace(' => ','=>',  implode('', explode("\n",print_r($val,1),30) ) ) ) ,5,50); 
     2051                    $out.='#'.sizeof($val).') => '; 
     2052                break; 
     2053 
     2054                case 'object': 
     2055                    $cn=get_class($val); 
     2056                    $cpn=get_parent_class($val); 
     2057                    $out.=" (".(!empty($cn) ? "class:{$cn}" :'').(!empty($cpn)?" | parent:{$cpn}":'').")"; 
     2058                break; 
     2059            } 
     2060             
     2061            echo  $out."\n"; 
     2062        } 
     2063        $out=ob_get_clean(); 
     2064 
     2065        $this->t(__FILE__,__CLASS__,__FUNCTION__,__LINE__,'',5); 
     2066         
     2067        return '<pre class="aa_pre2">'.$out."\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n".'</pre>'; 
    20432068    } 
    20442069 
  • askapache-debug-viewer/trunk/readme.txt

    r657069 r672542  
    22Contributors: askapache 
    33Donate link: http://www.askapache.com/donate/ 
    4 Tags: debug, debugging, error, errors, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 
     4Tags: debug, debugging, problem, issue, warning, error, errors, warning, problem, bug, problems, support, admin, programmer, developer, plugin, development, information, stats, logs, queries, htaccess, password, error, support, askapache, apache, rewrites, server 
    55Requires at least: 3.0 
    6 Tested up to: 3.5 
    7 Stable tag: 2.7 
     6Tested up to: 3.5.1 
     7Stable tag: 2.8 
    88 
    99Advanced debugging plugin for seeing the verbose of the verbose debug info.  Tech Support, Server Admins, WordPress Developers, Plugin Developers, or anyone wanting to see under the hood of their website and diagnose problems.  This debugging plugin goes further than any other in the way it uses Apache Server Status Handlers, CGI Script for server environment view, and in the shear amount of debugging information available, like the basically print_r($GLOBALS). 
Note: See TracChangeset for help on using the changeset viewer.