What is the potential issue with using an endless loop in PHP scripts?

Using an endless loop in PHP scripts can cause the script to consume excessive server resources and potentially crash the server. To prevent this issue, it is important to include a condition within the loop that will eventually evaluate to false and break out of the loop.

// Example of a loop with a condition to prevent it from being endless
$count = 0;
while ($count < 10) {
    // Code block
    $count++;
}