How can you improve the readability and efficiency of the parseif function in the given code?

The parseif function in the given code can be improved for readability and efficiency by simplifying the logic and reducing the number of unnecessary variables and conditions. One way to achieve this is by directly returning the parsed result instead of using multiple if-else statements. This will make the code cleaner and easier to understand.

function parseif($str) {
    $parsed = false;
    
    if (strpos($str, 'if') !== false) {
        $parsed = true;
    }
    
    return $parsed;
}