Re: [PHP-LANG] Re: Setting the line number for debugging
[email protected] ("Sean McCann") Wed, 14 Aug 2002 10:13:01 -0500
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[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"