How to use in method of name class

Best Prophecy code snippet using name.in

bind_char_4_11gR1.phpt

Source:bind_char_4_11gR1.phpt Github

copy

Full Screen

1--TEST--2PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter3--SKIPIF--4<?php5if (!extension_loaded('oci8')) die ("skip no oci8 extension");6require(__DIR__."/connect.inc");7// The bind buffer size edge cases seem to change each DB version.8preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);9if (!(isset($matches[0]) && $matches[1] < 12)) {10 die("skip expected output only valid when using pre-Oracle 12c database");11}12?>13--ENV--14NLS_LANG=.AL32UTF815--FILE--16<?php17// Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR18require(__DIR__.'/connect.inc');19// Initialization20$stmtarray = array(21 "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;",22);23oci8_test_sql_execute($c, $stmtarray);24// Run Test25echo "Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default\n";26$s = oci_parse($c, "begin :bv2 := bind_char_3_fn(:bv1); end;");27$bv1 = 'abc';28$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2);29if ($r)30 do_e($s);31var_dump($bv1, $bv2);32echo "Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";33$bv1 = 'abc';34$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);35if ($r)36 do_e($s);37var_dump($bv1, $bv2);38echo "Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";39$bv1 = 'abc';40$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);41if ($r)42 do_e($s);43var_dump($bv1, $bv2);44echo "Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";45$bv1 = 'abc';46$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);47if ($r)48 do_e($s);49var_dump($bv1, $bv2);50echo "Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC\n";51$bv1 = 'abc';52$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1), SQLT_AFC);53if ($r)54 do_e($s);55var_dump($bv1, $bv2);56echo "Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC\n";57$bv1 = 'abc';58$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)-1, SQLT_AFC);59if ($r)60 do_e($s);61var_dump($bv1, $bv2);62echo "Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC\n";63$bv1 = 'abc';64$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)+1, SQLT_AFC);65if ($r)66 do_e($s);67var_dump($bv1, $bv2);68echo "\n\nTests with ''\n\n";69echo "Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";70$bv1 = '';71$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);72if ($r)73 do_e($s);74var_dump($bv1, $bv2);75echo "Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";76$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);77if ($r)78 do_e($s);79var_dump($bv1, $bv2);80echo "Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";81$bv1 = '';82$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);83if ($r)84 do_e($s);85var_dump($bv1, $bv2);86echo "Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";87$bv1 = '';88$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);89if ($r)90 do_e($s);91var_dump($bv1, $bv2);92echo "Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";93$bv1 = '';94$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);95if ($r)96 do_e($s);97var_dump($bv1, $bv2);98echo "Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC\n";99$bv1 = '';100$r = oci_bind_by_name($s, ':bv1', $bv1, 0, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);101if ($r)102 do_e($s);103var_dump($bv1, $bv2);104echo "Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC\n";105$bv1 = '';106$r = oci_bind_by_name($s, ':bv1', $bv1, 1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);107if ($r)108 do_e($s);109var_dump($bv1, $bv2);110echo "\n\nTests with NULL\n";111echo "Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";112$bv1 = null;113$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);114if ($r)115 do_e($s);116var_dump($bv1, $bv2);117echo "Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";118$bv1 = null;119$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);120if ($r)121 do_e($s);122var_dump($bv1, $bv2);123echo "Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";124$bv1 = null;125$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);126if ($r)127 do_e($s);128var_dump($bv1, $bv2);129echo "Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";130$bv1 = null;131$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);132if ($r)133 do_e($s);134var_dump($bv1, $bv2);135echo "Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";136$bv1 = null;137$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);138if ($r)139 do_e($s);140var_dump($bv1, $bv2);141echo "Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC\n";142$bv1 = null;143$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);144if ($r)145 do_e($s);146var_dump($bv1, $bv2);147function do_e($s)148{149 echo " Executing:\n";150 $r = @oci_execute($s);151 if (!$r) {152 $m = oci_error($s);153 echo " Oci_execute error ORA-".$m['code']."\n";154 return;155 }156}157// Cleanup158$stmtarray = array(159 "drop function bind_char_3_fn"160);161oci8_test_sql_execute($c, $stmtarray);162echo "Done\n";163?>164--EXPECT--165Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default166 Executing:167 Oci_execute error ORA-6502168string(3) "abc"169NULL170Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default171 Executing:172string(3) "abc"173string(3) "abc"174Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default175 Executing:176string(3) "abc"177string(3) "abc"178Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC179 Executing:180string(3) "abc"181string(10) "abc "182Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC183 Executing:184string(3) "abc"185string(3) "abc"186Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC187 Executing:188 Oci_execute error ORA-6502189string(3) "abc"190string(3) "abc"191Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC192 Executing:193string(3) "abc"194string(4) "abc "195Tests with ''196Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC197 Executing:198string(0) ""199NULL200Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default201 Executing:202string(0) ""203NULL204Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default205 Executing:206string(0) ""207NULL208Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC209 Executing:210string(0) ""211NULL212Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC213 Executing:214string(0) ""215NULL216Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC217 Executing:218string(0) ""219NULL220Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC221 Executing:222string(0) ""223NULL224Tests with NULL225Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC226 Executing:227NULL228NULL229Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default230 Executing:231NULL232NULL233Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default234 Executing:235NULL236NULL237Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC238 Executing:239NULL240NULL241Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC242 Executing:243NULL244NULL245Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC246 Executing:247NULL248NULL249Done...

Full Screen

Full Screen

bind_char_3_11gR1.phpt

Source:bind_char_3_11gR1.phpt Github

copy

Full Screen

1--TEST--2PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter3--SKIPIF--4<?php5if (!extension_loaded('oci8')) die ("skip no oci8 extension");6require(__DIR__."/connect.inc");7// The bind buffer size edge cases seem to change each DB version.8preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);9if (!(isset($matches[0]) && $matches[1] < 12)) {10 die("skip expected output only valid when using pre-Oracle 12c database");11}12?>13--ENV--14NLS_LANG=.AL32UTF815--FILE--16<?php17require(__DIR__.'/connect.inc');18// Initialization19$stmtarray = array(20 "create or replace function bind_char_3_fn(p1 char) return char as begin return p1; end;",21);22oci8_test_sql_execute($c, $stmtarray);23// Run Test24echo "Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default\n";25$s = oci_parse($c, "begin :bv2 := bind_char_3_fn(:bv1); end;");26$bv1 = 'abc';27$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2);28if ($r)29 do_e($s);30var_dump($bv1, $bv2);31echo "Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";32$bv1 = 'abc';33$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);34if ($r)35 do_e($s);36var_dump($bv1, $bv2);37echo "Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";38$bv1 = 'abc';39$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);40if ($r)41 do_e($s);42var_dump($bv1, $bv2);43echo "Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";44$bv1 = 'abc';45$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);46if ($r)47 do_e($s);48var_dump($bv1, $bv2);49echo "Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC\n";50$bv1 = 'abc';51$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1), SQLT_AFC);52if ($r)53 do_e($s);54var_dump($bv1, $bv2);55echo "Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC\n";56$bv1 = 'abc';57$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)-1, SQLT_AFC);58if ($r)59 do_e($s);60var_dump($bv1, $bv2);61echo "Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC\n";62$bv1 = 'abc';63$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)+1, SQLT_AFC);64if ($r)65 do_e($s);66var_dump($bv1, $bv2);67echo "\n\nTests with ''\n\n";68echo "Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";69$bv1 = '';70$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);71if ($r)72 do_e($s);73var_dump($bv1, $bv2);74echo "Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";75$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);76if ($r)77 do_e($s);78var_dump($bv1, $bv2);79echo "Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";80$bv1 = '';81$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);82if ($r)83 do_e($s);84var_dump($bv1, $bv2);85echo "Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";86$bv1 = '';87$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);88if ($r)89 do_e($s);90var_dump($bv1, $bv2);91echo "Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";92$bv1 = '';93$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);94if ($r)95 do_e($s);96var_dump($bv1, $bv2);97echo "Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC\n";98$bv1 = '';99$r = oci_bind_by_name($s, ':bv1', $bv1, 0, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);100if ($r)101 do_e($s);102var_dump($bv1, $bv2);103echo "Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC\n";104$bv1 = '';105$r = oci_bind_by_name($s, ':bv1', $bv1, 1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);106if ($r)107 do_e($s);108var_dump($bv1, $bv2);109echo "\n\nTests with NULL\n";110echo "Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";111$bv1 = null;112$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);113if ($r)114 do_e($s);115var_dump($bv1, $bv2);116echo "Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";117$bv1 = null;118$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);119if ($r)120 do_e($s);121var_dump($bv1, $bv2);122echo "Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";123$bv1 = null;124$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);125if ($r)126 do_e($s);127var_dump($bv1, $bv2);128echo "Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";129$bv1 = null;130$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);131if ($r)132 do_e($s);133var_dump($bv1, $bv2);134echo "Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";135$bv1 = null;136$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);137if ($r)138 do_e($s);139var_dump($bv1, $bv2);140echo "Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC\n";141$bv1 = null;142$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);143if ($r)144 do_e($s);145var_dump($bv1, $bv2);146function do_e($s)147{148 echo " Executing:\n";149 $r = @oci_execute($s);150 if (!$r) {151 $m = oci_error($s);152 echo " Oci_execute error ORA-".$m['code']."\n";153 return;154 }155}156// Cleanup157$stmtarray = array(158 "drop function bind_char_3_fn"159);160oci8_test_sql_execute($c, $stmtarray);161echo "Done\n";162?>163--EXPECT--164Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default165 Executing:166 Oci_execute error ORA-6502167string(3) "abc"168NULL169Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default170 Executing:171string(3) "abc"172string(3) "abc"173Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default174 Executing:175string(3) "abc"176string(3) "abc"177Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC178 Executing:179string(3) "abc"180string(10) "abc "181Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC182 Executing:183string(3) "abc"184string(3) "abc"185Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC186 Executing:187 Oci_execute error ORA-6502188string(3) "abc"189string(3) "abc"190Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC191 Executing:192string(3) "abc"193string(4) "abc "194Tests with ''195Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC196 Executing:197string(0) ""198NULL199Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default200 Executing:201string(0) ""202NULL203Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default204 Executing:205string(0) ""206NULL207Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC208 Executing:209string(0) ""210NULL211Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC212 Executing:213string(0) ""214NULL215Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC216 Executing:217string(0) ""218NULL219Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC220 Executing:221string(0) ""222NULL223Tests with NULL224Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC225 Executing:226NULL227NULL228Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default229 Executing:230NULL231NULL232Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default233 Executing:234NULL235NULL236Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC237 Executing:238NULL239NULL240Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC241 Executing:242NULL243NULL244Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC245 Executing:246NULL247NULL248Done...

Full Screen

Full Screen

bind_char_3.phpt

Source:bind_char_3.phpt Github

copy

Full Screen

1--TEST--2PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter3--SKIPIF--4<?php5if (!extension_loaded('oci8')) die ("skip no oci8 extension");6require(__DIR__."/connect.inc");7// The bind buffer size edge cases seem to change each DB version.8preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);9if (!(isset($matches[0]) && $matches[1] >= 12)) {10 die("skip expected output only valid when using Oracle 12c database");11}12?>13--ENV--14NLS_LANG=.AL32UTF815--FILE--16<?php17require(__DIR__.'/connect.inc');18// Initialization19$stmtarray = array(20 "create or replace function bind_char_3_fn(p1 char) return char as begin return p1; end;",21);22oci8_test_sql_execute($c, $stmtarray);23// Run Test24echo "Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default\n";25$s = oci_parse($c, "begin :bv2 := bind_char_3_fn(:bv1); end;");26$bv1 = 'abc';27$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2);28if ($r)29 do_e($s);30var_dump($bv1, $bv2);31echo "Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";32$bv1 = 'abc';33$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);34if ($r)35 do_e($s);36var_dump($bv1, $bv2);37echo "Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";38$bv1 = 'abc';39$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);40if ($r)41 do_e($s);42var_dump($bv1, $bv2);43echo "Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";44$bv1 = 'abc';45$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);46if ($r)47 do_e($s);48var_dump($bv1, $bv2);49echo "Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC\n";50$bv1 = 'abc';51$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1), SQLT_AFC);52if ($r)53 do_e($s);54var_dump($bv1, $bv2);55echo "Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC\n";56$bv1 = 'abc';57$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)-1, SQLT_AFC);58if ($r)59 do_e($s);60var_dump($bv1, $bv2);61echo "Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC\n";62$bv1 = 'abc';63$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)+1, SQLT_AFC);64if ($r)65 do_e($s);66var_dump($bv1, $bv2);67echo "\n\nTests with ''\n\n";68echo "Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";69$bv1 = '';70$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);71if ($r)72 do_e($s);73var_dump($bv1, $bv2);74echo "Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";75$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);76if ($r)77 do_e($s);78var_dump($bv1, $bv2);79echo "Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";80$bv1 = '';81$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);82if ($r)83 do_e($s);84var_dump($bv1, $bv2);85echo "Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";86$bv1 = '';87$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);88if ($r)89 do_e($s);90var_dump($bv1, $bv2);91echo "Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";92$bv1 = '';93$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);94if ($r)95 do_e($s);96var_dump($bv1, $bv2);97echo "Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC\n";98$bv1 = '';99$r = oci_bind_by_name($s, ':bv1', $bv1, 0, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);100if ($r)101 do_e($s);102var_dump($bv1, $bv2);103echo "Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC\n";104$bv1 = '';105$r = oci_bind_by_name($s, ':bv1', $bv1, 1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);106if ($r)107 do_e($s);108var_dump($bv1, $bv2);109echo "\n\nTests with NULL\n";110echo "Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";111$bv1 = null;112$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);113if ($r)114 do_e($s);115var_dump($bv1, $bv2);116echo "Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n";117$bv1 = null;118$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10);119if ($r)120 do_e($s);121var_dump($bv1, $bv2);122echo "Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n";123$bv1 = null;124$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10);125if ($r)126 do_e($s);127var_dump($bv1, $bv2);128echo "Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n";129$bv1 = null;130$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC);131if ($r)132 do_e($s);133var_dump($bv1, $bv2);134echo "Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n";135$bv1 = null;136$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC);137if ($r)138 do_e($s);139var_dump($bv1, $bv2);140echo "Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC\n";141$bv1 = null;142$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC);143if ($r)144 do_e($s);145var_dump($bv1, $bv2);146function do_e($s)147{148 echo " Executing:\n";149 $r = @oci_execute($s);150 if (!$r) {151 $m = oci_error($s);152 echo " Oci_execute error ORA-".$m['code']."\n";153 return;154 }155}156// Cleanup157$stmtarray = array(158 "drop function bind_char_3_fn"159);160oci8_test_sql_execute($c, $stmtarray);161echo "Done\n";162?>163--EXPECT--164Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default165 Executing:166 Oci_execute error ORA-6502167string(3) "abc"168NULL169Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default170 Executing:171string(3) "abc"172string(3) "abc"173Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default174 Executing:175string(3) "abc"176string(3) "abc"177Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC178 Executing:179string(3) "abc"180string(10) "abc "181Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC182 Executing:183string(3) "abc"184string(3) "abc"185Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC186 Executing:187 Oci_execute error ORA-6502188string(3) "abc"189string(3) "abc"190Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC191 Executing:192string(3) "abc"193string(4) "abc "194Tests with ''195Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC196 Executing:197string(0) ""198NULL199Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default200 Executing:201string(0) ""202NULL203Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default204 Executing:205string(0) ""206NULL207Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC208 Executing:209string(0) ""210NULL211Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC212 Executing:213string(0) ""214NULL215Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC216 Executing:217string(0) ""218NULL219Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC220 Executing:221string(0) ""222NULL223Tests with NULL224Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC225 Executing:226NULL227NULL228Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default229 Executing:230NULL231NULL232Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default233 Executing:234NULL235NULL236Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC237 Executing:238NULL239NULL240Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC241 Executing:242NULL243NULL244Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC245 Executing:246NULL247NULL248Done...

Full Screen

Full Screen

in

Using AI Code Generation

copy

Full Screen

1echo "this is the second page";2echo "this is the third page";3echo "this is the fourth page";4echo "this is the fifth page";5echo "this is the sixth page";6echo "this is the seventh page";7echo "this is the eighth page";8echo "this is the ninth page";9echo "this is the tenth page";10echo "this is the eleventh page";11echo "this is the twelfth page";12echo "this is the thirteenth page";13echo "this is the fourteenth page";14echo "this is the fifteenth page";15echo "this is the sixteenth page";16echo "this is the seventeenth page";17echo "this is the eighteenth page";

Full Screen

Full Screen

in

Using AI Code Generation

copy

Full Screen

1$object = new name();2$object->method(1,2,3,4);3$object = new name();4$object->method(1,2,3,4);5$object = new name();6$object->method(1,2,3,4);7$object = new name();8$object->method(1,2,3,4);9$object = new name();10$object->method(1,2,3,4);11$object = new name();12$object->method(1,2,3,4);13$object = new name();14$object->method(1,2,3,4);15$object = new name();16$object->method(1,2,3,4);17$object = new name();18$object->method(1,2,3,4);19$object = new name();20$object->method(1,2,3,4);21$object = new name();22$object->method(1,2,3,4);23$object = new name();24$object->method(1,2,3,4);25$object = new name();26$object->method(1,2,3,4);27$object = new name();28$object->method(1,2,3,4);29$object = new name();30$object->method(1,2,3,4);31$object = new name();32$object->method(1,2

Full Screen

Full Screen

in

Using AI Code Generation

copy

Full Screen

1public function method()2{3 return $this->name;4}5public function method()6{7 return $this->name;8}9public function method()10{11 return $this->name;12}13public function method()14{15 return $this->name;16}17public function method()18{19 return $this->name;20}21public function method()22{23 return $this->name;24}25public function method()26{27 return $this->name;28}29public function method()30{31 return $this->name;32}33public function method()34{35 return $this->name;36}37public function method()38{39 return $this->name;40}41public function method()42{43 return $this->name;44}45public function method()46{47 return $this->name;48}49public function method()50{51 return $this->name;52}53public function method()54{55 return $this->name;56}57public function method()58{59 return $this->name;60}61public function method()62{63 return $this->name;64}65public function method()66{67 return $this->name;68}69public function method()70{

Full Screen

Full Screen

in

Using AI Code Generation

copy

Full Screen

1class name{2 public function __construct() {3 $this->name = 'name';4 }5}6class name2 extends name{7 public function __construct() {8 $this->name = 'name2';9 }10 public function get_name() {11 return $this->name;12 }13}14$object = new name2();15echo $object->get_name();16class name{17 public function __construct() {18 $this->name = 'name';19 }20}21class name2 extends name{22 public function __construct() {23 parent::__construct();24 $this->name = 'name2';25 }26 public function get_name() {27 return $this->name;28 }29}30$object = new name2();31echo $object->get_name();32class name{33 public function __construct() {34 $this->name = 'name';35 }36}37class name2 extends name{38 public function __construct() {39 parent::__construct();40 $this->name = 'name2';41 }42 public function get_name() {43 return $this->name;44 }45}46$object = new name2();47echo $object->get_name();48class name{49 public function __construct() {50 $this->name = 'name';51 }52}53class name2 extends name{54 public function __construct() {55 parent::__construct();56 $this->name = 'name2';57 }58 public function get_name() {59 return $this->name;60 }61}62$object = new name2();63echo $object->get_name();64class name{65 public function __construct() {66 $this->name = 'name';67 }68}69class name2 extends name{70 public function __construct() {71 parent::__construct();72 $this->name = 'name2';73 }74 public function get_name() {75 return $this->name;76 }77}78$object = new name2();

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Prophecy automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Trigger in code on LambdaTest Cloud Grid

Execute automation tests with in on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful