title: register_shutdown_function() php
body: <p>I am new at php. I came to know about register_shutdown_function() in php. I have read about this function in php.net manual that when script finish execution this function calls. But i have a question</p>
  
  <p>What if i put this function in namespace like</p>
  
  <pre><code> namespace MyNamespace;
   register_shutdown_function("myHandler");  // this throws an error because it can't find function
   function myHandler() 
   { 
      // Some Code.
   }
  
  
   namespace MyNamespace;
   register_shutdown_function("MyNamespace\myHandler");  // this throws no error.
   function myHandler() 
   { 
      // Some Code.
   }
  </code></pre>
  
  <p>why this happens both register_shutdown_function() and myHandler() are in same namespace??</p>
  
  <p>and if i put this namespace in different file and i include that file but i won't use this namespace 'MyNamespace' then does it execute?</p>