If you have issues with manipulating XMLType columns beyond the 4K limit imposed by character-type handling, Christopher Jones posted code on how to INSERT in Oracle database, since the SELECT and UPDATE are already covered in Underground PHP and Oracle Manual (new manual page).

My free book (see sidebar) has examples of how to do this using CLOB handling in PHP. I noticed that my xmlinsert.php example in the book does a SELECT and UPDATE, but never actually does an INSERT. The INSERT code is conceptually no different from UPDATE but, for completeness, here is an expanded example explicitly showing it

The idea of the code is to use oci_bind_by_name with maxlength=-1 and type=OCI_B_CLOB while you bind value using oci_new_descriptor :