<?php

if (preg_match('/^[A-PR-UWY-ZĄĆĘŁŃÓŚŹŻ]*$/iu', "spółka")) {
	echo "The whole string contains only Polish letters";
}