In this example, we introduce a sleep() function to add a delay of 5 seconds before the script exits. During this delay, the shutdown() function will be executed. Package Library: This function is a part of the PHP Core Library and does not need any additional package/library to be installed.