- var_dump: documentation ( source)
- crypt: documentation ( source)
<?php
$salt20 = '12345678901234567890';
$pw = 'test';
// see if Blowfish hashing is possible
var_dump(CRYPT_BLOWFISH);
echo "Hash with salt20: " . crypt($pw, '$2a$11$' . $salt20) . "\n";
echo "Hash with salt21: " . crypt($pw, '$2a$11$x' . $salt20) . "\n";
echo "Hash with salt22: " . crypt($pw, '$2a$11$xy' . $salt20) . "\n";
echo "Hash with salt23: " . crypt($pw, '$2a$11$xyz' . $salt20) . "\n";