get current line number
| From: | Erik Price | Date: | Thu, 20 Jun 2002 14:14:26 +0000 |
| Subject: | get current line number | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103131@lists.php.net to get a copy of this message | ||
Hi,
I've searched the manual and the archives, but can't find out if there is a way to get the current line number of execution. I am writing a function, and want to write an error trap using die() like this:
if (!$result = mysql_query($sql, $db)) {
$line_number = // function to get current line number
die("Query failed in listbox_generator() on line " . $line_number);
}
Not sure if this is possible or not...
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com