Is using md5 or sha-1 a more secure option for password encryption in PHP compared to base64 encoding?

Using md5 or sha-1 for password encryption is more secure than base64 encoding because md5 and sha-1 are cryptographic hash functions designed for securely hashing passwords. Base64 encoding is not a secure method for password encryption as it is simply an encoding scheme and not a cryptographic hash function.

$password = "password123";
$hashed_password_md5 = md5($password);
$hashed_password_sha1 = sha1($password);

echo "MD5 Hashed Password: " . $hashed_password_md5 . "\n";
echo "SHA-1 Hashed Password: " . $hashed_password_sha1;