Cleanup PHP document.