Is saying “if ( $a != null && $a == 5)” the same as “if ($a == 5)”
https://softwareengineering.stackexchange.com/questions/171591
-
05-11-2019 - |
Pergunta
First off, sorry if this is answered somewhere else. I did a brief search, but wasn't sure how to ask in search terms.
I'm looking at some code and came across lot's of statements like this:
if ( ($a != empty_or_null_or_notDefined && $a == 5 )
Is this the same as just saying:
if ( $a == 5 )
?
(language is PHP.)
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a softwareengineering.stackexchange