1$uppercase = preg_match('@[A-Z]@', $password);
2$lowercase = preg_match('@[a-z]@', $password);
3$number = preg_match('@[0-9]@', $password);
4
5if(!$uppercase || !$lowercase || !$number || strlen($password) < 8) {
6 // tell the user something went wrong
7}
8
1^(?=\P{Ll}*\p{Ll})(?=\P{Lu}*\p{Lu})(?=\P{N}*\p{N})(?=[\p{L}\p{N}]*[^\p{L}\p{N}])[\s\S]{8,}$
2