How can the use of the assignment operator "=" instead of the comparison operator "==" impact the functionality of the code snippet in PHP?

Using the assignment operator "=" instead of the comparison operator "==" can impact the functionality of the code snippet by unintentionally assigning a value to a variable instead of checking for equality. This can lead to unexpected behavior and bugs in the code. To solve this issue, make sure to use the correct comparison operator "==" when checking for equality in conditional statements.

// Incorrect code using assignment operator "=" instead of comparison operator "=="
$number = 10;

if($number = 5) {
    echo "Number is equal to 5";
} else {
    echo "Number is not equal to 5";
}
```

```php
// Corrected code using comparison operator "=="
$number = 10;

if($number == 5) {
    echo "Number is equal to 5";
} else {
    echo "Number is not equal to 5";
}