Maneira mais simples de verificar se a variável não é igual a vários valores de string?
Códigos atuais:
<?php
// See the AND operator; How do I simplify/shorten this line?
if( $some_variable !== 'uk' && $some_variable !== 'in' ) {
// Do something
}
?>
E:
<?php
// See the OR operator; How do I simplify/shorten this line?
if( $some_variable !== 'uk' || $some_variable !== 'in' ) {
// Do something else
}
?>
Existe uma maneira mais simples (isto é, menor) de escrever as duas condições?
NOTA: Sim, eles são diferentes e estou esperando maneiras diferentes de encurtar os códigos.