title: Redirect to custom error page if there is error in the page
body: <p>I am new to <code>PHP</code> web development. I want to know is there any code in PHP that redirects me to a page(<em>let's name it "myerrorpage.php"</em>) if there is some error on the page?</p>
  
  <p>In <code>JSP</code> it's possible using the following code</p>
  
  <pre><code>&lt;%@ page errorPage="myerrorpage.jsp" %&gt;
  </code></pre>
  
  <p>I want to know is there any above <code>JSP</code> type of code in PHP?is yes then please help</p>
  
  <p>Any help is appreciated...</p>