To check password is correct or not, we need three values: password, password_hash and password_salt
If length of password_hash = 32 (password generated on V3)
$password_hash = md5(md5('password') . md5('password_salt'));
If password_hash > 32 (password generated on V4)
$password_hash = password_hash('password', PASSWORD_BCRYPT, array('cost' => 10));
To check password is correct or not:
if (password_verify('password', 'password_hash')){ //Password correct } else { //Password incorrect }