xref: /PHP-7.3/ext/filter/tests/bug69202.phpt (revision fdbdb115)
1--TEST--
2Bug #69202 (FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used)
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
5--FILE--
6<?php
7var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_BACKTICK));
8var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK));
9var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK));
10var_dump(filter_var("``a`b`c``", FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH));
11?>
12--EXPECT--
13string(3) "abc"
14string(3) "abc"
15string(3) "abc"
16string(9) "``a`b`c``"
17