Does performance really matter? It seems premature optimization premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
$classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
$classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
$classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
classCount++;$classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
$classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.
Does performance really matter? It seems premature optimization.
Actually, I'd rewrite the last part to a more readable form:
$classCount = 0;
if ($foundLetter) {
$classCount++;
}
if ($foundNumber) {
$classCount++;
}
if ($foundSymbol) {
classCount++;
}
if ($classCount >= 2) {
return true;
}
return false;
It would be more important and less error-prone if you have more than three character classes.