TOKYO/BEIJING/AMSTERDAM, Oct 22 (Reuters) - Global firms and governments rushed on Thursday to patch critical flaws in the PHP programming language that underpins much of the internet, as cloud firms reported a surge of hacking attempts after the vulnerabilities were disclosed.