--TEST-- Prefetch with REF cursor. Test No 2 --SKIPIF-- = 10))) { die("skip expected output only valid when using Oracle 10g or greater database server"); } preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches); if (!(isset($matches[0]) && (($matches[1] == 11 && $matches[2] >= 2) || ($matches[1] >= 12) ))) { die("skip test expected to work only with Oracle 11gR2 or greater version of client"); } ?> --FILE-- --EXPECTF-- ------Test 1- Check Roundtrips with prefetch 0 and 5 ----------- array(2) { [0]=> string(1) "0" [1]=> string(5) "test0" } array(2) { [0]=> string(1) "1" [1]=> string(5) "test1" } array(2) { [0]=> string(1) "2" [1]=> string(5) "test2" } array(2) { [0]=> string(1) "3" [1]=> string(5) "test3" } array(2) { [0]=> string(1) "4" [1]=> string(5) "test4" } Number of roundtrips made with prefetch count 0 for 5 rows is 6 array(2) { [0]=> string(1) "5" [1]=> string(5) "test5" } array(2) { [0]=> string(1) "6" [1]=> string(5) "test6" } array(2) { [0]=> string(1) "7" [1]=> string(5) "test7" } array(2) { [0]=> string(1) "8" [1]=> string(5) "test8" } array(2) { [0]=> string(1) "9" [1]=> string(5) "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]=> string(1) "0" [1]=> string(5) "test0" } Fetch Row from PL/SQL int(101) string(%d) "test101" Done