real_escape_string($input); if ($opts != null) { if (in_array('spchars', $opts)) //special chars $input = htmlspecialchars($input); if (in_array('nnegint', $opts)) //non-negative integer { $int_options = array('options' => array('min_range' => 0)); $input = var_dump(filter_var($input, FILTER_VALIDATE_INT, $int_options)); } } else $input = strip_tags($input); } ?>