3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // This is stored in the file: $storedhash = hash("sha256", "salt" + "password"); echo $storedhash + "\n"; // Logging in: $password = "passworld"; $pwdhash = hash("sha256", "salt" + $password); echo $pwdhash + "\n"; if ($pwdhash === $storedhash) { echo "Successfully entered password"; } else { echo "Nofie."; }
based on YkqUk
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/cPDic on line 4 Warning: A non-numeric value encountered in /in/cPDic on line 4 Notice: A non well formed numeric value encountered in /in/cPDic on line 5 Warning: A non-numeric value encountered in /in/cPDic on line 5 5 Warning: A non-numeric value encountered in /in/cPDic on line 9 Warning: A non-numeric value encountered in /in/cPDic on line 9 Notice: A non well formed numeric value encountered in /in/cPDic on line 10 Warning: A non-numeric value encountered in /in/cPDic on line 10 5Successfully entered password
Output for 5.3.18 - 7.0.20
55Successfully entered password