Answers for "set maximum execution time php by cli"

PHP
2

php code to increase maximum execution time

ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
ini_set('max_execution_time', '0'); // for infinite time of execution
Posted by: Guest on June-30-2020
0

set count down CLI php

<?php

echo "Continue? (Y/N) - ";

$stdin = fopen('php://stdin', 'r');
$response = fgetc($stdin);
if ($response != 'Y') {
   echo "Aborted.\n";
   exit;
}

$seconds = 5;

for ($i = $seconds; $i > 0; --$i) {
   echo $i;
   usleep(250000);
   echo '.';
   usleep(250000);
   echo '.';
   usleep(250000);
   echo '.';
   usleep(250000);
}

echo " Running NOW\n";
// run command here
Posted by: Guest on September-30-2020

Code answers related to "set maximum execution time php by cli"

Browse Popular Code Answers by Language