Re: Re: Setting the line number for debugging
| From: | Thomas Lochmatter | Date: | Wed, 14 Aug 2002 15:29:11 +0000 |
| Subject: | Re: Re: Setting the line number for debugging | ||
| References: | 1 2 3 4 | Groups: | php.lang |
| Request: | Send a blank email to php-lang+get-358@lists.php.net to get a copy of this message | ||
This is a good idea. Together with set_error_handler which I just found in
the docs, my problem should be solved.
Anyway, a syntax similar to perl or C would be a nice goodie for php ...
Thank you
- Thomas
"Sean McCann" <sean@mudbuginfo.com> schrieb im Newsbeitrag
news:20020814151147.84329.qmail@pb1.pair.com...
> > __FILE__ and __LINE__ will *get* the information, but not *set*
> >
> > there is no equivalent to Perl or C #file and #line
>
> Thank you for clarifying my misinterpretation of the original question.
>
> Nevertheless, even though there are no PHP language mechanics analogous to
> Perl's #line, there are still workarounds using __LINE__.
> For example:
>
> $line_mod = 1 - __LINE__; // Set the current line to "Line 1"
>
> // 100 lines later....
> echo "Modified line number is ".(__LINE__+$line_mod);
> // Outputs "Modified line number is 101"
>
>