why an overlay ? PHP is a server-side language, it doesnt need an overlays, it needs fixing.
It's not like javascript where you dont control the client, you control everything that is running on your servers.
HHVM is good for Facebook,though i fail to understand how they could not migrate to any other serverside language given the number of developpers they hire, unless the legacy code is an unmaintainable,unreadble mess. Twitter did it(rails to jvm).