Hashing an entire PHP array into a unique value...
Looking for a way to produce a filename-safe hash of a given PHP array.  I'm currently doing:

    $filename = md5(print_r($someArray, true));

... but it feels "hacky" using print_r() to generate a string unique to each array.

Any bright ideas for a cleaner way to do this?
Hashing an entire PHP array into a unique value...
===

Looking for a way to produce a filename-safe hash of a given PHP array.  I'm currently doing:

    $filename = md5(print_r($someArray, true));

... but it feels "hacky" using print_r() to generate a string unique to each array.

Any bright ideas for a cleaner way to do this?