Skip to content

Instantly share code, notes, and snippets.

@adelarcubs
Last active March 9, 2017 21:43
Show Gist options
  • Save adelarcubs/2aab0792c3747139c212579d701509ab to your computer and use it in GitHub Desktop.
Save adelarcubs/2aab0792c3747139c212579d701509ab to your computer and use it in GitHub Desktop.
<?php
$userPassword = '123456';
$options = ['cost' => 10];
$hash = password_hash($userPassword, PASSWORD_DEFAULT, $options);
// save $hash as password on database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment