Reputation:
When I run a script in the browser, I can get the time limit that is set in the configuration with:
ini_get('max_execution_time');
When I run a script from the command line, I can set the time limit with:
php -d max_execution_time=5 script.php
But how can I get the maximum execution time in the command line?
Upvotes: 17
Views: 19838
Reputation: 805
$ php -r "echo ini_get('max_execution_time') . PHP_EOL;";
$ echo "<?php echo ini_get('max_execution_time') . PHP_EOL;" | php
Upvotes: 4
Reputation: 11285
PHP cli by default not have max_execution_time
limit
You can get by running:
php -i | grep max_execution_time
Upvotes: 25