xref: /PHP-7.3/ext/filter/tests/020.phpt (revision 782352c5)
1--TEST--
2filter_var() and FILTER_SANITIZE_MAGIC_QUOTES
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
5--FILE--
6<?php
7
8var_dump(filter_var("test'asd'asd'' asd\'\"asdfasdf", FILTER_SANITIZE_MAGIC_QUOTES));
9var_dump(filter_var("'", FILTER_SANITIZE_MAGIC_QUOTES));
10var_dump(filter_var("", FILTER_SANITIZE_MAGIC_QUOTES));
11var_dump(filter_var(-1, FILTER_SANITIZE_MAGIC_QUOTES));
12
13echo "Done\n";
14?>
15--EXPECT--
16string(36) "test\'asd\'asd\'\' asd\\\'\"asdfasdf"
17string(2) "\'"
18string(0) ""
19string(2) "-1"
20Done
21