Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php infinite loop

$interval=60; //minutes
  set_time_limit( 0 );
  $sleep = $interval*60-(time());

  while ( 1 ){
     if(time() != $sleep) {
       // the looping will pause on the specific time it was set to sleep
       // it will loop again once it finish sleeping.
       time_sleep_until($sleep); 
     }
     #do the routine job, trigger a php function and what not.
   }
Comment

infinite loop php

//this infinte loop never stops until the if condition became true 
while(1){
			if(/*condition to exit from while*/);break;}
			ob_flush();	
			flush();
			sleep(2);
        	}
Comment

PREVIOUS NEXT
Code Example
Php :: install laravel scout 
Php :: function to find the mod of a number in php 
Php :: how to get private images in s3 laravel 
Php :: how to create module in laravel 
Php :: enable phpmailer cpanel 
Php :: model not found laravel 
Php :: how to hide submenu admin wordpress 
Php :: how to add an array into an associative array in php 
Php :: get data from stdclass object php 
Php :: get from link php 
Php :: php array if 
Php :: cakephp 
Php :: compress video file size php 
Php :: get data in php 
Php :: crypt password php 
Php :: php read excel file 
Php :: default time of session in php 
Php :: laravel get data from database by id 
Php :: laravel send data with a redirect 
Php :: php mvc example 
Php :: laravel debugbar not showing 
Php :: Use the DebugBar like an array where keys are the collector names 
Php :: seguridad de las api en laravel 
Php :: type declaration php 
Php :: where post_type like 
Php :: how to alter table stracture in sql using php 
Php :: how to get session variables from cookie string 
Php :: ubuntu PHP Installation broken - shows strange php code as response 
Php :: install php 7.4 
Php :: yii2 modules commands are not showing in console 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =