I found the following code on the Web and would like to know why the autor does replace all + signs after base64-encoding the return value of  mcrypt_create_iv(). 
    $salt = mcrypt_create_iv(22, MCRYPT_DEV_URANDOM);
    $salt = base64_encode($salt);
    $salt = str_replace('+', '.', $salt); 
The salt is later passed to crypt() for generating a password hash. So my assumption is, the replacement of all + with . has to do with crypt(). 
 
     
    