Search code examples
phpcompatibilityfilter-input

Filter input array for PHP < 5.2


I have a code with a lot of using this function. but now i need do code compatible with PHP 5.1.6 (i dont have access to update PHP or install any extension), so I need some user definied function to declare it. I search on Google, but without success. Do You have any idea how to solve this problem? Thanks, RS.


Solution

  • Filter functions are very powerful, and is a big work reproduce they.

    If you want to reproduce it you can do:

    if(!function_exists('filter_input_array'))
    {
        function filter_input_array($type, $definition)
        {
            // Write code here
        }
    }