I am new to php. I found out about register_shutdown_function () in php. I read about this function in the php.net manual when the script completes the execution of this function. But I have a question
What if I put this function in a namespace, for example
namespace MyNamespace;
register_shutdown_function("myHandler");
function myHandler()
{
}
namespace MyNamespace;
register_shutdown_function("MyNamespace\myHandler");
function myHandler()
{
}
why is this happening both register_shutdown_function () and myHandler () are in the same namespace ??
and if I put this namespace in another file, and I will include this file, but I will not use this namespace "MyNamespace", and then will it do it?
source
share