#21155 [Opn->Bgs]: Macro Request

From: Date: Sat, 26 Apr 2003 14:44:55 +0000
Subject: #21155 [Opn->Bgs]: Macro Request
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38452@lists.php.net to get a copy of this message
ID: 21155 Updated by: helly@php.net Reported By: james at grickle dot org -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Slackware-current (12/22/02) PHP Version: 4.2.3 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Maybe it would, but that is not the way __FILE__ and __LINE__ work. Simply use them as they are now: They always return the current file and line - no more no less. Previous Comments: ------------------------------------------------------------------------ [2002-12-22 22:45:39] james at grickle dot org Hello, I would like to request something along the lines of macros. It would help a lot when you need to run __LINE__ and/or __FILE__ constants through a function. A simplified version of what I'd need them for. Currently I have: errOut([severity], [message]); Every time I use errOut I have __FILE__ and __LINE__ in the message: define(FATAL, 7); errOut(FATAL, __FILE__ . ": " . __LINE__ . ": Database error bla bla bla"); It could be shortened up by something like this: mdefine("DOERR", "errOut($1, __FILE__ . ': ' . __LINE__ . ': ' . $2)"); DOERR(FATAL,"Database Error bla bla bla"); This could be used for more vital things than that of course. Anything along those lines would be great. Thank You, James Harr ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21155&edit=1

« previous php.bugs (#38452) next »