3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This is stored in the file: $storedhash = hash("sha256", "salt" + "password"); // Logging in: $password = "password" if (hash("sha256", "salt" + $password) === $storedhash) { echo "Successfully entered password" } else { echo "Nofie." }
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.30, 5.6.7 - 5.6.14
Parse error: syntax error, unexpected 'if' (T_IF) in /in/KNfef on line 8
Process exited with code 255.

preferences:
198.99 ms | 1395 KiB | 65 Q