PHP - error_get_last method for warnings?
<p>I am using <a href="http://php.net/manual/en/function.unlink.php" rel="nofollow"><code>unlink</code></a> on my PHP page. In some situations, Permission may be denied for deleting the directory. Instead of having </p>

<p><code>Warning: unlink(stuff/New folder) [function.unlink]: Permission denied in ... on line 30</code></p>

<p>show up on the rendered page, is there a way for me to do a "warning_get_last" that will capture the last given warning, so I can output it nicely? Or does <code>error_get_last</code> include these?</p>

<p>I know I can suppress the warnings with <code>@unlink</code> and that I can also check to see if <code>unlink</code> returns false, but I would like to know the error message that goes along with it <em>if</em> it does fail.</p>
