This function appears to work with PL/SQL associative arrays (index-by tables) but I was unable to get it to work with PL/SQL varrays(PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL OCI8 >= 1.2.0)
oci_bind_array_by_name — Bindet ein PHP-Array an einen Oracle-PL/SQL-Arrayparameter
$statement,$param,&$var,$max_array_length,$max_item_length = -1,$type = SQLT_AFC
   Bindet die PHP-Variable var an den Oracle-Platzhalter
   param, der auf ein Oracle-PL/SQL-Array zeigt. Ob
   dieser zur Ein- oder Ausgabe genutzt wird, wird zur Laufzeit ermittelt.
  
statementEin gültiger Zeiger auf ein OCI-Statement.
paramDer Oracle-Platzhalter.
varEin Array.
max_array_lengthSetzt die maximale Länge sowohl für die Eingabe- als auch die Ergebnis-Arrays.
max_item_lengthSetzt die maximale Länge für Array-Elemente. Wenn dieser nicht spezifiziert oder gleich -1 ist, sucht oci_bind_array_by_name() das längste Element im Eingabe-Array und nutzt dieses als maximale Länge der Array-Elemente.
typeSollte benutzt werden, um den Typ der PL/SQL-Array-Elemente zu bestimmen. Siehe untenstehende Liste verfügbarer Typen.
          SQLT_NUM - für NUMBER-Arrays.
         
          SQLT_INT - für INTEGER-Arrays (beachte: INTEGER
          ist ein Synonym für NUMBER(38), aber der
          SQLT_NUM-Typ wird nicht funktionieren, obwohl
          es Synonyme sind).
         
          SQLT_FLT - für FLOAT-Arrays.
         
          SQLT_AFC - für CHAR-Arrays.
         
          SQLT_CHR - für VARCHAR2-Arrays.
         
          SQLT_VCS - für VARCHAR-Arrays.
         
          SQLT_AVC - für CHARZ-Arrays.
         
          SQLT_STR - für STRING-Arrays.
         
          SQLT_LVC - für LONG-VARCHAR-Arrays.
         
          SQLT_ODT - für DATE-Arrays.
         
Beispiel #1 oci_bind_array_by_name()-Beispiel
<?php
$conn = oci_connect("hr", "hrpwd", "localhost/XE");
if (!$conn) {
    $m = oci_error();
    trigger_error(htmlentities($m['message']), E_USER_ERROR);
}
$create = "CREATE TABLE bind_example(name VARCHAR(20))";
$stid = oci_parse($conn, $create);
oci_execute($stid);
$create_pkg = "
CREATE OR REPLACE PACKAGE ARRAYBINDPKG1 AS
  TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER;
  PROCEDURE iobind(c1 IN OUT ARRTYPE);
END ARRAYBINDPKG1;";
$stid = oci_parse($conn, $create_pkg);
oci_execute($stid);
$create_pkg_body = "
CREATE OR REPLACE PACKAGE BODY ARRAYBINDPKG1 AS
  CURSOR CUR IS SELECT name FROM bind_example;
  PROCEDURE iobind(c1 IN OUT ARRTYPE) IS
    BEGIN
    -- Masseneinfügung
    FORALL i IN INDICES OF c1
      INSERT INTO bind_example VALUES (c1(i));
    -- Abrufen und umkehren
    IF NOT CUR%ISOPEN THEN
      OPEN CUR;
    END IF;
    FOR i IN REVERSE 1..5 LOOP
      FETCH CUR INTO c1(i);
      IF CUR%NOTFOUND THEN
        CLOSE CUR;
        EXIT;
      END IF;
    END LOOP;
  END iobind;
END ARRAYBINDPKG1;";
$stid = oci_parse($conn, $create_pkg_body);
oci_execute($stid);
$stid = oci_parse($conn, "BEGIN arraybindpkg1.iobind(:c1); END;");
$array = array("one", "two", "three", "four", "five");
oci_bind_array_by_name($stid, ":c1", $array, 5, -1, SQLT_CHR);
oci_execute($stid);
var_dump($array);
?>This function appears to work with PL/SQL associative arrays (index-by tables) but I was unable to get it to work with PL/SQL varraysWe were able to get the example included for the "OCI_BIND_ARRAY_BY_NAME" to work. However, the example is NOT actually binding with a PL/SQL array of any type. It is writing data to an Oracle table named "bind_example". Notice how this table is created. The table does NOT have an array type as one of its fields. Since this is the case, there cannot be any binding to a PL/SQL array because at least one field in the table must be either a VARRAY, NESTED TABLE or ASSOCIATIVE ARRAY data type. We searched the Internet and could not find any examples that actually read from a PL/SQL array type. We were able to get data from a PL/SQL VARRAY data type, but only by using a SELECT statement.