I have installed PHP 8.1 and I started testing my old project. I have used the filter FILTER_SANITIZE_STRING
like so:
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);
Now I get this error:
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated
The same happens when I use FILTER_SANITIZE_STRIPPED
:
Deprecated: Constant FILTER_SANITIZE_STRIPPED is deprecated
What can I replace it with?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…