- substr: documentation ( source)
- strtoupper: documentation ( source)
- md5: documentation ( source)
<?php
foreach ( array( 1, 2, 3 ) as $v )
{
$hash = strtoupper( substr( md5( $v ), 0, 16 ) );
echo substr( $hash, 0, 4 ) . '-' . substr( $hash, 4, 4 ) . '-'. substr( $hash, 8, 4 ) . "\n";
}