1--TEST-- 2filter_var() and FILTER_SANITIZE_ADD_SLASHES 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_ADD_SLASHES)); 9var_dump(filter_var("'", FILTER_SANITIZE_ADD_SLASHES)); 10var_dump(filter_var("", FILTER_SANITIZE_ADD_SLASHES)); 11var_dump(filter_var(-1, FILTER_SANITIZE_ADD_SLASHES)); 12 13echo "Done\n"; 14?> 15--EXPECT-- 16string(36) "test\'asd\'asd\'\' asd\\\'\"asdfasdf" 17string(2) "\'" 18string(0) "" 19string(2) "-1" 20Done 21