I had this happen to a couple of my sites recently (yesterday) and spent most of the day trying to figure out what was going on. After this post appeared I checked my functions.php file and found some weird php code at the top.
After some more searching I also found a functions-child.php file in my child theme folder which had never existed before. I just restored my previous files and deleted the functions-child.php and now everything seems back to normal.
Is there a way to prevent this from happening? I keep Wordpress, my templates and plugins up to date.
Thanks