LOBs sent as MTOM attachments on a SOAP response from SOA Gateway can be handled by a PHP program. This, however, requires the presence of the WSO2 Web Services Framework
Provided here are the following sample PHP programs dealing with LOBs access:
wsf_lobsGet: Get a record, save the LOB to a file