Can you use your own filter with filters filter_var () and filter_input ()

PHP filters are pretty cool, but what will you do if the filters don't quite match what you want? Can you create your own filter?

+3
source share
1 answer

Yes, you can use FILTER_CALLBACKand provide your own filtering function (as a callback).

+9
source

Source: https://habr.com/ru/post/1749446/


All Articles