Line Numbers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gleeb
Forum Commoner
Posts: 87
Joined: Tue May 13, 2003 7:01 am
Location: UK
Contact:

Line Numbers

Post by Gleeb »

Is there any way that I can find out which line PHP is upto in the processing? I want to use it for error reporting. If there's a better way to do it (line number is still important, though) please tell me :)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You can use __LINE__, e.g.

Code: Select all

echo 'You are currently on line '.__LINE__;
Mac
Post Reply