1--TEST-- 2ocierror() 3--SKIPIF-- 4<?php 5$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen 6require(__DIR__.'/skipif.inc'); 7?> 8--FILE-- 9<?php 10 11require __DIR__."/connect.inc"; 12 13if (!empty($dbase)) { 14 var_dump(ocilogon($user, $password, $dbase)); 15} 16else { 17 var_dump(ocilogon($user, $password)); 18} 19 20var_dump($s = ociparse($c, "WRONG SYNTAX")); 21var_dump(ociexecute($s)); 22var_dump(ocierror($s)); 23 24echo "Done\n"; 25 26?> 27--EXPECTF-- 28resource(%s) of type (oci8 connection) 29resource(%s) of type (oci8 statement) 30 31Warning: ociexecute(): ORA-00900: %s in %s on line %d 32bool(false) 33array(4) { 34 ["code"]=> 35 int(900) 36 ["message"]=> 37 string(%d) "ORA-00900: %s" 38 ["offset"]=> 39 int(0) 40 ["sqltext"]=> 41 string(12) "WRONG SYNTAX" 42} 43Done 44