Its syntax is: int strspn (string string1, string string2) <? $password = "12345"; if (strspn($password, "1234567890") != strlen($password)) : print "Password cannot consist solely of numbers!"; endif; ?>