php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #21194 compiler time constant $_BUG_ROWNUMBER
Submitted: 2002-12-26 07:40 UTC Modified: 2002-12-26 07:49 UTC
From: odarcan at hotmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.3 OS: windows xp
Private report: No CVE-ID: None
 [2002-12-26 07:40 UTC] odarcan at hotmail dot com
Hi, bug tracking can be very difficult when you dont know where the problem is.

i propose that you create a special constant or variable like: $_BUG_ROWNUMBER and this variable (or const) will be given (at execution time) a value that represents the position OF the variable IN the php document.

for example, here the output from the die contstruct would be "error on line 3"
<?
echo "blabla";
mysql_query("wrong query") or die
    ("error on line ".$_BUG_ROWNUMBER);
?>

as you can see this would be very useful when debugging as you otherwise have to change every error message so that they will become a unique message and that you can be sure on which line it is..

thanks for your time,
Osman Darcan

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-26 07:49 UTC] tal@php.net
You can use the __LINE__ constant.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 08:01:32 2024 UTC