Edit report at https://bugs.php.net/bug.php?id=19236&edit=1
ID: 19236 Updated by: ni...@php.net Reported by: php-bugs at ketan dot org Summary: Need $php_errorLineNumber $php_errorScript in addition to $php_errormsg -Status: Open +Status: Closed Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: FreeBSD PHP Version: 4.2.2 -Assigned To: +Assigned To: nikic Block user comment: N Private report: N New Comment: Closing as error_get_last() provides this information as of PHP 5.2. Previous Comments: ------------------------------------------------------------------------ [2006-04-25 13:10:02] jason_priebe at yahoo dot com I get the point of an error_handler, but this doesn't help when you're eval-ing code that contains a parse error. The parse error doesn't trigger the error_handler. $php_errormsg contains the actual error string, but doesn't tell you what line of the eval-ed code contained the error. The httpd error log contains the offending line number, but AFAICT, I can't get to it inside my PHP code. ------------------------------------------------------------------------ [2002-09-04 18:13:35] php-bugs at ketan dot org It is half done the way it is now. If we have $php_errormsg, then we should have the other components of the standard php error, the line number and the script name. An error message in isolation is not very useful. ------------------------------------------------------------------------ [2002-09-04 17:11:50] w...@php.net That's too much magic; you can do this yourself using set_error_handler and having your error handler set up these global vars yourself. ------------------------------------------------------------------------ [2002-09-04 16:49:35] php-bugs at ketan dot org When using ini configuration directive track_errors = On, $php_errormsg contains the last error message. We need a corresponding variable $php_errorLineNumber (or whatever) that keeps track of where in the file the error occurred, and $php_errorScriptName to tell in which file the error occurred (in case of include()). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=19236&edit=1