This is really weird. I have a php script and i intentionally added a 60 second sleep. I run the script for three seconds and close my browser window. Somehow it still performs it functions, but with a 60 second delay ..even after the window is closed.
can someone explain how this is possible
The fact that your browser is opened or closed makes no difference. Once the PHP process has started, it will keep running until it ends. Browser or no browser.
It’s the same as asking “If a tree falls in a forest and no one is around to hear it, does it make a sound?”.