After switching from PHP 5 to 7 for a local 2.x install, I can't login I have Craft running locally, the latest 2.x branch. When I change the server to run PHP 7 instead of 5.x, the local Craft frontend still works, but I can't login to the backend. It says "Invalid username or password", even after doing the reset password process.

Trying to prep a site for upgrading to Craft 3, but if I can't even get Craft 2.x running on PHP 7... :-/
Turns out that it was a PHP configuration issue.

Under Windows, the paths in php.ini need to include a drive letter (eg. c:\xampp\php7\). By default they're root-relative (eg. \xampp\php7). When I originally installed XAMPP with PHP 5.x, it adjusted the paths automatically. But when I manually copied the PHP 7 folder into XAMPP to set it up for version switching, I overlooked the path discrepancy.

In this case, it was the inability of PHP 7 to set sessions that was causing the odd behavior.