--TEST-- Prefetch with REF cursor. Test No 2 --SKIPIF-- (11\.2|12\.)/', $phpinfo); if ($iv == 1) { $sv = oci_server_version($c); $sv = preg_match('/Release 1[012]\./', $sv, $matches); if ($sv != 1) { die ("skip expected output only valid when using Oracle 10g or greater server"); } } else { die ("skip expected output only valid when using Oracle 11.1 or greater client"); } ?> --FILE-- --EXPECTF-- ------Test 1- Check Roundtrips with prefetch 0 and 5 ----------- array(2) { [0]=> %unicode|string%(%d) "0" [1]=> %unicode|string%(%d) "test0" } array(2) { [0]=> %unicode|string%(%d) "1" [1]=> %unicode|string%(%d) "test1" } array(2) { [0]=> %unicode|string%(%d) "2" [1]=> %unicode|string%(%d) "test2" } array(2) { [0]=> %unicode|string%(%d) "3" [1]=> %unicode|string%(%d) "test3" } array(2) { [0]=> %unicode|string%(%d) "4" [1]=> %unicode|string%(%d) "test4" } Number of roundtrips made with prefetch count 0 for 5 rows is 6 array(2) { [0]=> %unicode|string%(%d) "5" [1]=> %unicode|string%(%d) "test5" } array(2) { [0]=> %unicode|string%(%d) "6" [1]=> %unicode|string%(%d) "test6" } array(2) { [0]=> %unicode|string%(%d) "7" [1]=> %unicode|string%(%d) "test7" } array(2) { [0]=> %unicode|string%(%d) "8" [1]=> %unicode|string%(%d) "test8" } array(2) { [0]=> %unicode|string%(%d) "9" [1]=> %unicode|string%(%d) "test9" } Number of roundtrips made with prefetch count 5 for 5 rows is 2 ------Test 2 - Set Prefetch before PL/SQL fetch ---------- Fetch Row from PHP array(2) { [0]=> %unicode|string%(%d) "0" [1]=> %unicode|string%(%d) "test0" } Fetch Row from PL/SQL %unicode|string%(%d) "101" %unicode|string%(%d) "test101" ------Test 3 - Set Prefetch after PL/SQL fetch ---------- Warning: oci_execute(): ORA-01001: %s ORA-06512: at "SYSTEM.REFCURPKG", line %d ORA-06512: at line %d in %s on line %d Fetch Row from PL/SQL %unicode|string%(%d) "101" %unicode|string%(%d) "test101" Fetch Row from PHP array(2) { [0]=> %unicode|string%(%d) "0" [1]=> %unicode|string%(%d) "test0" } ------Test 4- Overwrite prefetch----------- Fetch Row from PHP array(2) { [0]=> %unicode|string%(%d) "0" [1]=> %unicode|string%(%d) "test0" } Fetch Row from PL/SQL %unicode|string%(%d) "101" %unicode|string%(%d) "test101" Done