Extension: filterenhancementgood first issue
仓库指标
- 星标
- (596 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
From manual page: https://php.net/function.filter-var
There is no example with if and I saw a lot of implementations like:
if (!filter_var($value, $type)) {
echo 'error';
}
and it should be:
if (filter_var($value, $type) !== $value) {
echo 'error';
}
Especially, when you validated with FILTER_VALIDATE_BOOLEAN filter.