filterus masterPHP过滤库.zip
<?php require 'vendor/autoload.php'; use Filterus\Filter; $filter = Filter::map(array('foo' => 'string,min:4,default:test')); $tmp = array('foo' => 'bar'); var_dump(Filter::factory($filter)->filter($tmp)); //var_dump(Filter::factory($argv[1])->validate($argv[2]));PHP 过滤器用于验证和过滤来自非安全来源的数据,比如
用户评论