Re: [PHP-LANG] Re: Setting the line number for debugging

[email protected] ("Thomas Lochmatter") Wed, 14 Aug 2002 17:29:11 +0200
Newsgroups php.lang
Message-ID <[email protected]>
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" <[email protected]> schrieb im Newsbeitrag
news:[email protected]...
> > __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"
>
>