From the PHP: Logical Operators - Manual, you want to use either
- or
- || (this form has higher precedence)
$a or $b Or TRUE if either $a or $b is TRUE.
$a || $b Or TRUE if either $a or $b is TRUE.
So, you could use something like this
$len = strlen($name); // just get the length once and then
// use it to compare however many times....
if (!($len == 32 or $len == 40))