PHP 中的执行时间与空闲时间
这更多的是一个理论问题。
当我运行执行 passthru
对于其他程序,比如 Java 应用程序,我们假设程序运行了 30 分钟,然后优雅地结束,并且 PHP 每次都在循环中调用它...
... PHP 保持空闲状态的时间等待Java计为执行时间还是空闲时间?
This is more of a theoretical question.
When I run a PHP script that does a passthru
to some other program, say a Java application, let's assume that program works for 30 minutes and then ends gracefully and PHP keeps calling it in a loop every single time...
... does the time PHP stays idle waiting for Java count as execution time or as idle time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此手册页似乎表明在 Windows 上时间很重要作为执行时间,而在 Linux 上则不会。
This manual page seems to indicate that on Windows the time will count as execution time, whereas on Linux it will not.
据我所知,PHP 将等待(空闲)输出,直到满足最大执行时间。然后该过程将终止。编辑:我错了。 PHP 将挂起,直到程序通过 passthru 函数关闭,无论执行时间如何。我想念阅读文档。请参阅 http://php.net/manual/en/function.passthru.php< 上的注释/a>
As far as I know, PHP will wait (be idle) for the output until the maximum execution time is met. Then the process will terminate.Edit: I was wrong. PHP will hang until the program closes with the passthru function, regardless of the execution time. I miss read the documentation. See notes on http://php.net/manual/en/function.passthru.php