register_shutdown_function and sleep : register_shutdown_function « Utility Function « PHP






register_shutdown_function and sleep

 
<?
    function say_goodbye( ) {
            print "Goodbye!\n";
    }

    register_shutdown_function("say_goodbye");
    set_time_limit(1);
    print "Sleeping...\n";
    sleep(2);
    print "Done!\n";
?>
  
  








Related examples in the same category

1.void register_shutdown_function ( function callback[, mixed param [, mixed ...]] ) registers with PHP a function to be run when script execution ends