Stripping high/low ascii

What would something like this do?

function strip_high_low_ascii($string)
{ return filter_var($string, FILTER_SANITIZE_STRING, array('flags' => FILTER_FLAG_STRIP_HIGH|FILTER_FLAG_STRIP_LOW ));
}

It doesn't seem to work for me.

1 Answer

It strips any characters from the input string that are either lower than 32 ordinal, or higher than 127. Here is an ASCII reference table to show you which characters are between those values:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like