title: Can I make a PHP "macro" (like #define) to supply parameters for function calls?
body: <p>The parameters that I am talking about are <code>__FILE__</code> and <code>__LINE__</code> - those of the caller of the function, so that the function can use them in error reporting.</p>
  
  <p>Let's say that I have two files and line 100 of file_1.php calls <code>my_func()</code> in file_2.php</p>
  
  <p>I'd like to make that call <code>my_func(__FILE__, __LINE__)</code> so that if <code>my_func</code> encounters an error it can report it against file_1.php at line 100.</p>
  
  <p>I do that since there are hundreds of calls to <code>my_func</code> and reporting the error to be in my_func() itself might not be informative (unless I dump the stack). And I don't want to have to manually type those two parameters a few hundred times.</p>
  
  <p>In C I would do something like <code>#define MY_FUNC my_func(__FILE, __LINE)</code>  - can I do something similar in PHP?</p>