1--TEST-- 2PL/SQL bind with SQLT_CHR 3--EXTENSIONS-- 4oci8 5--SKIPIF-- 6<?php 7require_once 'skipifconnectfailure.inc'; 8?> 9--FILE-- 10<?php 11 12require __DIR__.'/connect.inc'; 13 14// Initialization 15 16$stmtarray = array( 17 "create or replace procedure bind_sqltchr_proc (msg_in in varchar2, msg_out out varchar2) 18 as 19 begin 20 msg_out := upper(msg_in); 21 end;" 22 23); 24 25oci8_test_sql_execute($c, $stmtarray); 26 27// Run Test 28 29echo "Test 1 - PL/SQL IN and OUT variables\n"; 30 31$stmt = oci_parse($c, "BEGIN bind_sqltchr_proc(:a, :b); END;"); 32$msg_in = "Cat got your keyboard?"; 33oci_bind_by_name($stmt, ":a", $msg_in, -1, SQLT_CHR); 34oci_bind_by_name($stmt, ":b", $msg_out, 800, SQLT_CHR); 35oci_execute($stmt); 36var_dump($msg_in); 37var_dump($msg_out); 38 39// Clean up 40 41$stmtarray = array( 42 "drop procedure bind_sqltchr_proc" 43); 44 45oci8_test_sql_execute($c, $stmtarray); 46 47?> 48--EXPECT-- 49Test 1 - PL/SQL IN and OUT variables 50string(22) "Cat got your keyboard?" 51string(22) "CAT GOT YOUR KEYBOARD?" 52