jeudi 26 janvier 2017

Why are these conditions different?

i just dont know what is wrong

here are the dumped variables:

$fd->getStatus() == string(6) "active"
$fd->getDriver()->getId() == int(118)
$ad->getDriver()->getId() == int(115)
$fd->getMode() == string(5) "early"

And here are the two conditions

if($fd->getStatus() ==  "active" && $fd->getMode() == "early" ) {

    if($fd->getDriver()->getId() != $ad->getDriver()->getId()){

        /*  THIS DOS  WORK / WILL RUN CODE IN HERE */
    }
}                    


if(($fd->getDriver()->getStatus() == "active") && ($fd->getDriver()->getId() != $ad->getDriver()->getId()) && ($fd->getMode() == "early") ) {
    /*  THIS DOS NOT WORK / WILL NOT CODE RUN IN HERE */
}

so afaik these two conditions should be similiar ?!, can somebody explain me what may be the difference

Aucun commentaire:

Enregistrer un commentaire