从一组变量生成哈希字符串

How can I generate a hash with let's say md5 from set of mixed variables?

The variables can be of any type, like multidimensional arrays, objects, integers etc.

The idea is to be able to identify within a function if the given arguments are exactly the same as the ones in the previous function call.

This would work but not for all type of vars:

$args = func_get_args();
$args = array_values($args);
echo md5(implode('', $args)); 

Maybe you just need md5(serialize($yourvar));.

See here: http://php.net/manual/en/function.serialize.php