Skip to content

Instantly share code, notes, and snippets.

@ChrisLTD
Created November 5, 2013 16:13
Show Gist options
  • Save ChrisLTD/7321474 to your computer and use it in GitHub Desktop.
Save ChrisLTD/7321474 to your computer and use it in GitHub Desktop.
<?php
$array = array(0, 1, 2, 3);
$string = print_r($array, true);
$filename = sha1( $string ) . ".sha1";
echo $filename . PHP_EOL;
$array = array(3, 2, 1, 0);
$string = print_r($array, true);
$filename = sha1( $string ) . ".sha1";
echo $filename . PHP_EOL;
// Output
// 32fd64c254c575e0b421597434570fabcf176632.sha1
// 219ac52504d91e82d9968d41c7543067fa9e6cbd.sha1
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment