If you are placing your quoted string within []'s, make sure you also escape the dash (-) character manually.
preg_match("/^[A-Za-z\d" . preg_quote('!@#$%^&*()-_=+\|[]{};:/?.><', '/') . "]{8,32}$/", $password)
The above will try to match the characters ')' through '_' whatever those are. So use the below expression:
preg_match("/^[A-Za-z\d" . preg_quote('!@#$%^&*()_=+\|[]{};:/?.><', '/') . "\-]{8,32}$/", $password)
Yes, I know I can use \w in place of A-Za-z, but I wanted to illustrate my point better :)