xref: /PHP-5.6/ext/filter/tests/020.phpt (revision 2c3db736)
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