#21155 [NEW]: Macro Request
| From: | james at grickle dot org | Date: | Mon, 23 Dec 2002 04:45:39 +0000 |
| Subject: | #21155 [NEW]: Macro Request | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-28234@lists.php.net to get a copy of this message | ||
From: james@grickle.org
Operating system: Slackware-current (12/22/02)
PHP version: 4.2.3
PHP Bug Type: Feature/Change Request
Bug description: Macro Request
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 bug report at http://bugs.php.net/?id=21155&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21155&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21155&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21155&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21155&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21155&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21155&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21155&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21155&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21155&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21155&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21155&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21155&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21155&r=isapi