Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Line Number (http://www.programmingforums.org/showthread.php?t=15542)

grimpirate Apr 2nd, 2008 4:20 PM

Line Number
 
Is there any function or PHP constant that returns/holds the current line number of script execution? Or some way to determine it?

Sane Apr 2nd, 2008 4:37 PM

Re: Line Number
 
Wow. Now why would you ever need to do that?

Try looking for traceback and debugging functions. Since the PHP debugger can show the line number of the error, it must be somewhere. But PHP might not give you access to everything like some languages do.

grimpirate Apr 2nd, 2008 4:48 PM

Re: Line Number
 
No worries Sane, it's '__LINE__'. I actually need it in order to implement assert, apparently the function is not available on the roadsend compiler.


All times are GMT -5. The time now is 4:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC