A small correction:

$backTrace = debug_backtrace();
$label     = $backTrace[ 0 ][ 'file' ] . ' ( ' . $backTrace[ 0 ]['line'] . '
)';

HTH




On 6/18/07, Shekar C Reddy <[EMAIL PROTECTED]> wrote:

$backTrace = debug_backtrace();
$label     = $backTrace[ 1 ][ 'file' ] . ' ( ' . $backTrace[ 1 ]['line'] .
' )';

HTH




On 6/12/07, Matthew Weier O'Phinney < [EMAIL PROTECTED]> wrote:
>
> -- Nick Lo < [EMAIL PROTECTED]> wrote
> (on Wednesday, 13 June 2007, 01:28 PM +1000):
> > One of the pains of using print_r() or var_dump() is the hunt to find
> > the ones you forget to remove or edit out. With Zend_Debug::dump()
> > the additional $label parameter allows you to go...
> >
> > Zend_Debug($wotsit, __FILE__);
> >
> > ...but only if you specify it. I wondered since unless given a value
> > $label does nothing as to whether it could default to something like
> > __FILE__ just to make Zend_Debug a little less typing and a little
> > more useful than the PHP variations.
>
> Won't work. __FILE__ in that case would refer to the class file in which
> Zend_Debug lives, and it's incredibly difficult, if not impossible, to
> determine where the method was called from and what file contained that
> code.
>
> --
> Matthew Weier O'Phinney
> PHP Developer            | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
>


Reply via email to