- crypt: documentation ( source)
<?php
$foo = 'foo';
$bar = 'barbarbarbarbarbarbarbarbarbarba';
$p = 'password';
$s = 'abcdefghijklmnopqrstuvwxyz012345';
$h = crypt($p, '$2a$07$'.'usesomesillystringfor'.'$');
print $h."\n";
$h = crypt($s, '$2a$07$'.'usesomesillystringfor'.'$');
print $h."\n";
$h = crypt($p.$s, '$2a$07$'.'usesomesillystringfor'.'$');
print $h."\n";
$h = crypt($s.$p, '$2a$07$'.'usesomesillystringfor'.'$');
print $h."\n";