问题:为什么这些在输出上不匹配?
所以我一直在追查一个让我很头疼的问题
我知道我清理 md5 哈希似乎很奇怪,但是这个类不仅以这种方式使用,而且我试图避免使用多种方法来做同样的事情。
class test {
public function select($match,$debug) {
$match1 = filter_var($match, FILTER_SANITIZE_STRING);
if ($debug == '1') {
var_dump($match,$match1);
}
}
}
$title = "April 2013"; // Example Title
$currentHUID = substr(md5($title), 0, 12); // Convert string to UID not for encryption just comparison first 12 char of MD5 Hash
$test = new test();
$test->select("'$currentHUID'",'1');
结果:字符串(14)“'8860d4398c9b'”字符串(22)“'8860d4398c9b'”