roopurt18 Posted November 14, 2006 Share Posted November 14, 2006 I have a function that should receive as it's arguments some of the magic constants (__FILE__, __LINE__, etc.). I'd like to be lazy and not have to remember the order of the arguments. Is there any way I can set up the function call like a #define in C / C++ so that it is replaced in the PHP file but not actually called in the define()?Thanks! Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 14, 2006 Share Posted November 14, 2006 I don't have an answer for your question, but if the function is going to use magic constants then why are you passing the values? Just call the values from within the function and you don't need to pass any values. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted November 14, 2006 Author Share Posted November 14, 2006 I need the function to use the values at the point of the function call, not within the function itself. Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 14, 2006 Share Posted November 14, 2006 [quote author=roopurt18 link=topic=114985.msg468011#msg468011 date=1163534161]I need the function to use the values at the point of the function call, not within the function itself.[/quote]Of course, makes sense. Quote Link to comment Share on other sites More sharing options...
Monkeymatt Posted November 14, 2006 Share Posted November 14, 2006 Just use debug_backtrace() to see what the line number and such were at the function call.http://us3.php.net/manual/en/function.debug-backtrace.phpMonkeymatt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.