diff --git a/reference/password/functions/password-needs-rehash.xml b/reference/password/functions/password-needs-rehash.xml
index 860758a4a4..9a4f173b2e 100644
--- a/reference/password/functions/password-needs-rehash.xml
+++ b/reference/password/functions/password-needs-rehash.xml
@@ -51,6 +51,40 @@
+
+
+ &reftitle.examples;
+
+
+ Example #1 password_needs_rehash() example
+
+ 11);
+
+// Verify stored hash against plain-text password
+if (password_verify($password, $hash)) {
+ // Check if a newer hashing algorithm is available
+ // or the cost has changed
+ if (password_needs_rehash($hash, PASSWORD_DEFAULT, $options)) {
+ // If so, create a new hash, and replace the old one
+ $newHash = password_hash($password, PASSWORD_DEFAULT, $options);
+ }
+
+ // Log user in
+}
+?>
+]]>
+
+ &example.outputs.similar;
+
+
+
&reftitle.returnvalues;