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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: odarcan at hotmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-26 07:49 UTC] tal@php.net
You can use the __LINE__ constant.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Sep 14 16:00:01 2025 UTC