self::BCRYPT_COST) ); $passwordPlain = ''; // Compatibility with bcrypt.js $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); return $passwordHash == '' ? '' : $passwordHash; } }