forrestfsu Posted May 19, 2008 Share Posted May 19, 2008 This might be a really foolish question, but here it goes. I am trying to determine what occurs here: <?php set_time_limit(0); echo 'DummyText'; ?> Since you set the time limit to have no time limit (that's what 0 does), will this script finish after printing 'DummyText' or will it still be open for ever? I'm assuming there is some process running the script and I want to make sure that it gets killed after printing. Thanks, Jesse Link to comment https://forums.phpfreaks.com/topic/106261-set_time_limit0-possibly-running-forever/ Share on other sites More sharing options...
peranha Posted May 19, 2008 Share Posted May 19, 2008 http://us3.php.net/set_time_limit Is says that if set to 0, no time limit is imposed. Link to comment https://forums.phpfreaks.com/topic/106261-set_time_limit0-possibly-running-forever/#findComment-544618 Share on other sites More sharing options...
forrestfsu Posted May 19, 2008 Author Share Posted May 19, 2008 exactly. so if there is no return or exit statement, does the script ever get killed? Link to comment https://forums.phpfreaks.com/topic/106261-set_time_limit0-possibly-running-forever/#findComment-544619 Share on other sites More sharing options...
peranha Posted May 19, 2008 Share Posted May 19, 2008 no, because there is no time limit. Link to comment https://forums.phpfreaks.com/topic/106261-set_time_limit0-possibly-running-forever/#findComment-544621 Share on other sites More sharing options...
forrestfsu Posted May 19, 2008 Author Share Posted May 19, 2008 Interesting, so if there were a "return" or "exit" statement, would it terminate? Link to comment https://forums.phpfreaks.com/topic/106261-set_time_limit0-possibly-running-forever/#findComment-544623 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.