Copied PHPAPI file from CC