How can I test a script going beyond its max time limit ?

My work : Sometimes when we run scripts from the browser and suddenly we get white screen without any error. Even i have faced this when i was exporting product from magento store.So after few hours of search i came across above question.
A function registered with register_shutdown_function will be called when the execution time limit is reached. You can test the limit with a busy wait:

   register_shutdown_function(function() {
       echo “shutdown function called\n”;
   set_time_limit(1); // Set time limit to 1 second (optional)
   for (;;) ;         // Busy wait



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s