|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-10-23 15:22 UTC] derick@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 11:00:01 2025 UTC | 
I'm writing a script which calls a function which handles errors. The function lies in a different file (it was included) than where the function was called. index.php --> calls function in wine.inc --> calls function in db.inc --> calls error handling function in wine.inc --> prints error nicely and exits at index.php __PARENTFILE__ would be "" and __PARENTLINE__ would be "". At wine.inc __PARENTFILE__ would be "/path/to/index.php" and __PARENTLINE__ would be the line number where we left index.php (called the function in wine.inc). At db.inc __PARENTFILE__ would be "/path/to/wine.inc" and __PARENTLINE__ would be the line number where we left wine.inc (where the function called was in db.inc). Make sense? I couldn't find ANYTHING in documentation that allowed such a view into the system. A $_EXECUTION like global would be nice too, showing at the point called which files were open (either through includes or requires or FOPENs) and the line numbers they were at at the time of calling. Or maybe this would be more proper as a function returning an array of information?