What are potential pitfalls when using a while loop with multiple conditions in PHP?

When using a while loop with multiple conditions in PHP, a potential pitfall is not properly updating the variables involved in the conditions within the loop, leading to an infinite loop or unexpected behavior. To avoid this, make sure to update the variables inside the loop to eventually meet the exit condition. Additionally, ensure that the conditions are logically sound to prevent unintended consequences.

$count = 0;
$max_count = 10;
$condition_met = false;

while ($count < $max_count && !$condition_met) {
    // Code block
    
    // Update variables
    $count++;
    if ($some_condition) {
        $condition_met = true;
    }
}