la seconda restituisce false

if (preg_match($pat,$foto2) == false) {
print 'Sono falsa';
}