3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pw = 'test123'; $pwInDb = sha1(sha1($pw)); $scramble = mt_rand(); //token $stage1_hash = sha1($pw); $token = sha1($scramble . sha1($stage1_hash)) ^ $stage1_hash; $stage1_hash = $token ^ sha1($scramble . $pwInDb); echo '<pre>'; echo sha1($stage1_hash); echo "\n"; echo $pwInDb;
Output for 4.3.0 - 7.1.0
<pre>2a3d1a00706cbc6f62772c3aba0fc6b52c4dc328 2a3d1a00706cbc6f62772c3aba0fc6b52c4dc328