Add language-specific support for exports, clean up PHP to avoid platform dependencies