Give it a new CLSID and change the engine name to ActivePHP5. Globals registered by the scripting host are now auto-globals and don't need to be declared global when accessed from within functions.