php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78888 Wrong values for PASSWORD_BCRYPT and PASSWORD_DEFAULT
Submitted: 2019-11-29 15:00 UTC Modified: 2019-11-29 15:06 UTC
From: l-x at mailbox dot org Assigned: cmb (profile)
Status: Not a bug Package: *Encryption and hash functions
PHP Version: 7.4.0 OS: irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: l-x at mailbox dot org
New email:
PHP Version: OS:

 

 [2019-11-29 15:00 UTC] l-x at mailbox dot org
Description:
------------
Wrong values for PASSWORD_BCRYPT and PASSWORD_DEFAULT

https://3v4l.org/54crg

Test script:
---------------
<?php

var_dump([
    PASSWORD_BCRYPT,
    PASSWORD_DEFAULT
]);


Expected result:
----------------
array(2) {
  [0]=>
  int(1)
  [1]=>
  int(1)
}

Actual result:
--------------
array(2) {
  [0]=>
  string(2) "2y"
  [1]=>
  NULL
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-11-29 15:06 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-11-29 15:06 UTC] cmb@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See <https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.password-algorithm-constants>.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 14:01:37 2025 UTC