Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP set_time_limit works but return false

Tags:

function

php

ini

Does someone face such problem?

set_time_limit() function changes the 'max_execution_time' value, but returns false

php -r 'var_dump(ini_get("max_execution_time"), set_time_limit(5), ini_get("max_execution_time"));'

Command line code:1:
string(1) "0"
Command line code:1:
bool(false)
Command line code:1:
string(1) "5"
like image 225
Kiwi Avatar asked Dec 14 '25 22:12

Kiwi


1 Answers

Found a solution: If you have enabled xdebug mod in your php.ini - set_time_limit() function will always return false

like image 138
Kiwi Avatar answered Dec 16 '25 21:12

Kiwi