PHP空变量内部条件

I have a condition in which it is using a variable to pull either a number through 0-17, the string "MAKEUP", or the variable will be empty. I would like it to output the text "WIN" if the variable is greater than the number 8 and "LOSS" if the variable is less than the number 9. I would also like it to out "MAKEUP" if the variable consist of the string MAKEUP, and to display nothing if the variable is empty. Seems pretty simple to me, but I'm having issues particularly with the empty part. Can anyone let me know what I am doing wrong here? Code below

    <?php
    $t1w8 = '';
    $result = $t1w8;
    if ($result > 8 && !empty($result)) {
        echo 'WON';
    } elseif ($result < 9 && !empty($result)) {
        echo 'LOSS';
    } elseif ($result == 'MAKEUP') {
        echo '-';
    } else {
        echo 'yooo';
    }
    ?>

Make some changes in your conditions like this

<?php
    //$result = "MAKEUP";
    $result = 0;
    if ($result === 'MAKEUP') {
        echo '-';
    }else if (is_numeric($result) && $result < 9 ) {
        echo 'LOSS';
    }else if (is_numeric($result) && $result >= 9 ) {
        echo 'WON';
    } else{
        echo 'yooo';
    }
?>

Live demo : https://eval.in/897120

try with this code

<?php

//$result = "MAKEUP";
$result = "";
//$result = "9";
//$result = "-";

if ($result == 'MAKEUP' && !empty($result) ) {
    echo '-';
} elseif ($result > 8 && !empty($result)) {
    echo 'WON';
} elseif ($result <= 8 && !empty($result)) {
    echo 'LOSS';
} else {
    echo 'yooo';
}
?>

for demo :demo code here

You have explained that your number range is from 0-17. You have also explained that you could get the word MAKEUP.

Based upon those constraints we could use something like this

$output = "";
// Do we have something?
if(strlen($result) > 0) {
    if (strtolower($result) == "makeup") {
        $output = "MAKEUP";
    }
    // assumes a single digit string
    else if ($result < 9) {
        $output = "LOSS";
    } else if ($result <= 17) {
        $output = "WIN";
    }
}
echo $output;