When are infinite loops are useful in PHP?

后端 未结 12 925
日久生厌
日久生厌 2020-12-09 21:17

While reading through the great online PHP tutorials of Paul Hudson he said

Perhaps surprisingly, infinite loops can sometimes be h

12条回答
  •  鱼传尺愫
    2020-12-09 21:48

    Maybe it useful when you write a command line PHP application? Because when PHP-scripts runs by web-server (Apache or any other) they lifetime is limited by 30 seconds by default (or you can manually change this limit at the configuration file).

提交回复
热议问题