title: What's PHP Equivalent of Java Servlet Filter?
body: <p>On Java side, we have a servlet filter that handles authentication. We don't have to change all other servlet or JSPs to add authentication to the page, unless the page needs customized content.</p>
  
  <p>How can we achieve the same on PHP? We don't use any frameworks on PHP.</p>