Posted by salmobytes on 01/31/08 22:21
In C you can make debug statments that announce the current
line number in the source, with something like:
printf("%d\n",__LINE__);
php (if php.ini is setup that way) often announces
line numbers when catching errors.
How can you do echo the equivalent of C's __LINE__ macro
on non-error but interesting debugging conditions?
If ($checkbook-balance < $100 && $subject == "wife")
echo sys_sourceline(), "<br>"; ....or some such
[Back to original message]
|