What are the potential drawbacks of including complex logic within an echo statement in PHP?

Including complex logic within an echo statement can make the code harder to read and maintain. It can also lead to errors if the logic is not properly handled. To solve this issue, it is recommended to separate the logic from the echo statement by assigning the result of the logic to a variable before echoing it out.

<?php
// Complex logic
$result = $variable1 + $variable2 * $variable3;

// Echo statement with the result
echo $result;
?>