How to log calling line of code which produces an error
<p>I get a notice from my php-script:</p>

<blockquote>
  <p>Undefined offset: 32 in C:\xampp\htdocs\WWW\myfilexyz.php on line 74</p>
</blockquote>

<p>I want to detect where the error occurs as the procedure which produces the error is called many times.</p>

<p>I added the following line of code:</p>

<pre><code>error_log("you made a mistake", 3, "errorfile.log");   
</code></pre>

<p>Looking into errorfile.log, the message appears 3 times, but the procedure is called more than 100 times. How can I find the 3 lines where the error is produced? </p>

<p>I would like to see sometime like:</p>

<blockquote>
  <p>"you made a mistake, called from line 234 from start.php"</p>
</blockquote>
