Will the use of while (1) in php cause an endless cycle?

do both php-fpm and cli modes cause an endless loop? when will while (1) be used? what are the ways to jump out of the while (1) loop

Php
Oct.13,2021

is bound to cause an endless loop. You can use the break keyword to jump out of the loop, such as a queue or to execute a script for a long time. But to pay attention to the problem that cpu takes up too much, you can use


as mentioned above, use while and sleep together, and where to use: the backend needs to run something all the time. And it takes nine times to sleep with sleep every few seconds or a period of time, and the appeal function can also be completed by using the crontab included in linux

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e50762-45093.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e50762-45093.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?