Is there a function similar to setTimeout() (JavaScript) for PHP?

前端 未结 9 1522
离开以前
离开以前 2020-12-06 16:08

The question sort of says it all - is there a function which does the same as the JavaScript function setTimeout() for PHP? I\'ve searched

9条回答
  •  情深已故
    2020-12-06 16:59

    PHP isn't event driven, so a setTimeout doesn't make much sense. You can certainly mimic it and in fact, someone has written a Timer class you could use. But I would be careful before you start programming in this way on the server side in PHP.

提交回复
热议问题