Streaming large data (LOBs) directly into an Oracle database with PHP

The OCI library allows you to stream large data in chunks directly into a LOB instead of loading it completely into memory first. This technique is only mentioned in the article Working with LOBs in Oracle and PHP on the Oracle Technology Network, but no code example is given there, so here’s my take: $sql …