13

Available since PHP 7.1.0, hard_timeout have 2 seconds as default value and accept integgers as value.

At documentation, http://php.net/manual/en/ini.core.php#ini.hard-timeout, there is no additional information available.

What's the difference between other "timeout" flags and hard_timeout in PHP?

LeonanCarvalho
  • 1,819
  • 3
  • 20
  • 39

1 Answers1

7

PHP timeout will try to kill the application "softly".

In case it can't, by any reason, the hard timeout will kill by force.

Info from here: http://php-news.ctrl-f5.net/message/php.internals/92559

Felippe Duarte
  • 14,901
  • 2
  • 25
  • 29
  • I think there are important comments inside this message on your link that can improve your answer, such as "It removes 'exit_on_timeout ini directive, and introduces hard_timeout" instead. – LeonanCarvalho Mar 22 '18 at 13:44
  • Does the integer's set in minutes? The default value seems to be "2", so is it 2 minutes? – Warface Mar 09 '20 at 17:38
  • 2
    Seconds. So two minutes would be 120 seconds. It doesn't mean that your application will be killed in two seconds of execution, but if after 2 seconds the "soft kill" won't work, the hard kill will be executed. – Felippe Duarte Mar 09 '20 at 20:10
  • "Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, sleep, etc... **is not included**" – a55 Oct 24 '21 at 23:49