1--TEST-- 2Test descriptor types for oci_new_descriptor() 3--SKIPIF-- 4<?php 5$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs 6require(dirname(__FILE__).'/skipif.inc'); 7?> 8--FILE-- 9<?php 10 11require dirname(__FILE__).'/connect.inc'; 12 13// Successful statements 14 15$d = oci_new_descriptor($c, OCI_D_FILE); 16var_dump($d); 17 18$d = oci_new_descriptor($c, OCI_DTYPE_FILE); 19var_dump($d); 20 21$d = oci_new_descriptor($c, OCI_D_LOB); 22var_dump($d); 23 24$d = oci_new_descriptor($c, OCI_DTYPE_LOB); 25var_dump($d); 26 27$d = oci_new_descriptor($c, OCI_D_ROWID); 28var_dump($d); 29 30$d = oci_new_descriptor($c, OCI_DTYPE_ROWID); 31var_dump($d); 32 33// Unsuccessful statements 34 35$d = oci_new_descriptor($c, OCI_B_CLOB); 36var_dump($d); 37 38$d = oci_new_descriptor($c, OCI_B_CLOB); 39var_dump($d); 40 41$d = oci_new_descriptor($c, OCI_DEFAULT); 42var_dump($d); 43 44$d = oci_new_descriptor($c, 1); 45var_dump($d); 46 47echo "Done\n"; 48 49?> 50--EXPECTF-- 51object(OCI-Lob)#%d (1) { 52 ["descriptor"]=> 53 resource(%d) of type (oci8 descriptor) 54} 55object(OCI-Lob)#%d (1) { 56 ["descriptor"]=> 57 resource(%d) of type (oci8 descriptor) 58} 59object(OCI-Lob)#%d (1) { 60 ["descriptor"]=> 61 resource(%d) of type (oci8 descriptor) 62} 63object(OCI-Lob)#%d (1) { 64 ["descriptor"]=> 65 resource(%d) of type (oci8 descriptor) 66} 67object(OCI-Lob)#%d (1) { 68 ["descriptor"]=> 69 resource(%d) of type (oci8 descriptor) 70} 71object(OCI-Lob)#%d (1) { 72 ["descriptor"]=> 73 resource(%d) of type (oci8 descriptor) 74} 75 76Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d 77NULL 78 79Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d 80NULL 81 82Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d 83NULL 84 85Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d 86NULL 87Done 88