<?php
$p71 = str_repeat('a', 71);
$p72 = $p71 . 'b';
$h = password_hash($p71, PASSWORD_BCRYPT);
$result = password_verify($p72, $h);
echo '71 vs 72 chars password_verify result: ';
var_dump($result);
$p72 = str_repeat('a', 72);
$p73 = $p72 . 'b';
$h = password_hash($p72, PASSWORD_BCRYPT);
$result = password_verify($p73, $h);
echo '72 vs 73 chars password_verify result: ';
var_dump($result);
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.6 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
- 71 vs 72 chars password_verify result: bool(false)
72 vs 73 chars password_verify result: bool(true)
preferences:
48.9 ms | 406 KiB | 5 Q