> -----Original Message-----
> From: Richard Quadling [mailto:rquadl...@gmail.com]
> Sent: Tuesday, October 12, 2010 7:04 AM
> To: 惠新宸
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Line by line debugger for PHP for command line
> work.
> 
> On 12 October 2010 14:58, 惠新宸 <huixinc...@baidu.com> wrote:
> > Hi:
> >  xdebug and vim with dbgp
> > plugin(http://www.vim.org/scripts/script.php?script_id=1929) can
> > satsfy your needs.
> >
> >  there is also a manual(http://www.laruence.com/2010/06/21/1608.html
> > ) if you can speak chinese .
> >
> >
> > 惠新宸     laruence
> > Mail:   huixinc...@baidu.com
> > Tel :   +86 010 5992-6238
> > http://www.laruence.com/
> 
> 我不讲中文,而是感谢您您的提议。
> 
> or should I have said
> 
> 我不讲中文,而是感謝您您的提議。
> 
> 
> 
> --
> Richard Quadling
> Twitter : EE : Zend
> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

Or you could use what I made a while back.  Adjust the output according to your 
need.  You can leave the echo to view on screen or write it to file and 
download that file for offsite/offline review/debug.  This should give you all 
internals working of the script/app without you having to wade through all that 
mess...  

<?php
echo '<pre style="text-align: left;">';

$loadedExtensions = get_loaded_extensions();
//echo '$loadedExtensions &raquo; ';
//print_r($loadedExtensions);

$requiredFiles = get_required_files();
echo '$requiredFiles &raquo; ';
print_r($requiredFiles);

$includedFiles = get_included_files();
echo '$includedFiles &raquo; ';
print_r($includedFiles);

$definedConstants = get_defined_constants(true);
foreach($loadedExtensions as $extensionName)
{
        unset($definedConstants[$extensionName]);
}
echo '$definedConstants &raquo; ';
print_r($definedConstants);

$definedVars = get_defined_vars();
unset($definedVars['GLOBALS'], $definedVars['_POST'], $definedVars['_GET'],
        $definedVars['_COOKIE'], $definedVars['_FILES'], $definedVars['_ENV'],
        $definedVars['_REQUEST'], $definedVars['_SERVER'],
        $definedVars['loadedExtensions'], $definedVars['extensionName'],
        $definedVars['requiredFiles'],  $definedVars['includedFiles'],
        $definedVars['declaredInterfaces'], $definedVars['declaredClasses'],
        $definedVars['definedConstants'], $definedVars['definedFunctions']);
echo '$definedVars &raquo; ';
print_r($definedVars);

$definedFunctions = get_defined_functions();
unset($definedFunctions['internal']);
echo '$definedFunctions &raquo; ';
print_r($definedFunctions);

$declaredInterfaces = get_declared_interfaces();
// remove PHP's internal interfaces ... adjust according to extensions loaded
$declaredInterfaces = array_slice($declaredInterfaces, 12);
echo '$declaredInterfaces &raquo; ';
print_r($declaredInterfaces);

$declaredClasses = get_declared_classes();
// remove PHP's internal classes ... adjust according to extensions loaded
$declaredClasses = array_slice($declaredClasses, 133);
echo '$declaredClasses &raquo; ';
print_r($declaredClasses);

foreach ($declaredClasses as $className)
{
        $reflect = new ReflectionClass($className);
        echo '<hr />';
        echo $reflect;
}
echo '</pre>';
?>

Regards,
Tommy


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to