3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $hash = '$2y$10$rAWi0P16ypjJs3c73bsukuOIYqwLMlwbcQd83fRDbQICFaFtlmJ7.'; $user = 'cliente1_user1'; $password = 'cliente1_user1'; function verifyPassword($user, $password, $hash){ $prepare_pass = md5($user.":pimcore:".$password); $ret = crypt($prepare_pass, '$2y$10$rAWi0P16ypjJs3c73bsuku'); echo $prepare_pass; echo "\r\n"; echo $ret; echo "\r\n"; echo $hash; echo "\r\n"; if (strcmp($hash, $ret) == 0){ return true; } else { return false; } } if (verifyPassword($user, $password, $hash)) { echo 'Password is valid!'; } else { echo 'Invalid password.'; } if (password_verify(md5('cliente1_user1:pimcore:cliente1_user1'), $hash)) { //echo 'Password is valid!'; } else { //echo 'Invalid password.'; } ?>
based on N9D5n
Output for 5.5.0 - 7.3.1
837f3eb5e3557a44cc0b09cddaeab5cf $2y$10$rAWi0P16ypjJs3c73bsukuOIYqwLMlwbcQd83fRDbQICFaFtlmJ7. $2y$10$rAWi0P16ypjJs3c73bsukuOIYqwLMlwbcQd83fRDbQICFaFtlmJ7. Password is valid!