As we do this most of the time to increase the Maximum execution time using php function set_time_limit or through php.ini settings like max_execution_time.
But there is always some maximum limit on server to set this. phpinfo() shows us the default max_execution_time set on the server, but sometimes we are allowed to increase it using the methods as described in previous lines. I would like to detect how much execution time setting we are ALLOWED TO INCREASE. I want to detect through PHP script only as I do not have server access and I want to show the proof of this limitation 🙂
Thanks in advance.
It’s difficult to detect the server’s default settings, but I’d suggest using something like this:
And store the value in a database. When you initialize the script, see if there’s an existing value — if not run the above as a function and save it. If one exists, you have your number.
You can find out more about this code here and through PHP’s documentation.