Report question

Question: PHP: fastest way to check for invalid characters (all but a-z, A-Z, 0-9, #, -, ., $)?