xref: /php-src/ext/filter/tests/bug69202.phpt (revision bf94010b)
1--TEST--
2Bug #69202 (FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used)
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7var_dump(filter_var("``a`b`c``", FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_BACKTICK));
8var_dump(filter_var("``a`b`c``", FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK));
9var_dump(filter_var("``a`b`c``", FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK));
10var_dump(filter_var("``a`b`c``", FILTER_UNSAFE_RAW, 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