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; // Logging in: $password = "passworld"; $pwdhash = hash("sha256", "salt" + $password); echo $pwdhash; if ($pwdhash === $storedhash) { echo "Successfully entered password"; } else { echo "Nofie."; }
based on AFVJV
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/YkqUk on line 4 Warning: A non-numeric value encountered in /in/YkqUk on line 4 5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9 Warning: A non-numeric value encountered in /in/YkqUk on line 9 Warning: A non-numeric value encountered in /in/YkqUk on line 9 5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9Successfully entered password
Output for 5.3.18 - 7.0.20
5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e95feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9Successfully entered password