PHP  
 PHP_7_2
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/oci8/tests/bug27303_2_11gR1.phpt ('Bug #27303 (OCIBindByName binds numeric PHP values as characters)')

Script

1: <?php
2:
3:
require dirname(__FILE__).'/connect.inc';
4:     
5:
$stmtarray = array(
6:     
"drop sequence myseq",
7:     
"drop table mytab",
8:     
"create sequence myseq",
9:     
"create table mytab (mydata varchar2(20), seqcol number)"
10:
);
11:
12:
oci8_test_sql_execute($c$stmtarray);
13:
14:
define('MYLIMIT'200);
15:
define('INITMYBV'11);
16:
17:
$stmt "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv";
18:
19:
$stid OCIParse($c$stmt);
20: if (!
$stid) { echo "Parse error"; die; }
21:
22:
$mybv INITMYBV;
23:
$r OCIBindByName($stid':MYBV'$mybv);
24: if (!
$r) { echo "Bind error"; die; }
25:
26: for (
$i 1$i MYLIMIT$i++) {
27:     
$r OCIExecute($stidOCI_DEFAULT);
28:     if (!
$r) { echo "Execute error"; die; }
29:     
var_dump($mybv);
30: }
31:
32:
OCICommit($c);
33:
34:
$stmtarray = array(
35:     
"drop sequence myseq",
36:     
"drop table mytab"
37:
);
38:
39:
oci8_test_sql_execute($c$stmtarray);
40:
41: echo 
"Done\n";
42:
?>
43:

Expected

string(1) "1"
string(1) "2"
string(1) "3"
string(1) "4"
string(1) "5"
string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
string(2) "10"
string(2) "11"
string(2) "12"
string(2) "13"
string(2) "14"
string(2) "15"
string(2) "16"
string(2) "17"
string(2) "18"
string(2) "19"
string(2) "20"
string(2) "21"
string(2) "22"
string(2) "23"
string(2) "24"
string(2) "25"
string(2) "26"
string(2) "27"
string(2) "28"
string(2) "29"
string(2) "30"
string(2) "31"
string(2) "32"
string(2) "33"
string(2) "34"
string(2) "35"
string(2) "36"
string(2) "37"
string(2) "38"
string(2) "39"
string(2) "40"
string(2) "41"
string(2) "42"
string(2) "43"
string(2) "44"
string(2) "45"
string(2) "46"
string(2) "47"
string(2) "48"
string(2) "49"
string(2) "50"
string(2) "51"
string(2) "52"
string(2) "53"
string(2) "54"
string(2) "55"
string(2) "56"
string(2) "57"
string(2) "58"
string(2) "59"
string(2) "60"
string(2) "61"
string(2) "62"
string(2) "63"
string(2) "64"
string(2) "65"
string(2) "66"
string(2) "67"
string(2) "68"
string(2) "69"
string(2) "70"
string(2) "71"
string(2) "72"
string(2) "73"
string(2) "74"
string(2) "75"
string(2) "76"
string(2) "77"
string(2) "78"
string(2) "79"
string(2) "80"
string(2) "81"
string(2) "82"
string(2) "83"
string(2) "84"
string(2) "85"
string(2) "86"
string(2) "87"
string(2) "88"
string(2) "89"
string(2) "90"
string(2) "91"
string(2) "92"
string(2) "93"
string(2) "94"
string(2) "95"
string(2) "96"
string(2) "97"
string(2) "98"
string(2) "99"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "10"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "11"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "12"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "13"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "14"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "15"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "16"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "17"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "18"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
string(2) "19"
Done

Output

string(1) "1"
string(1) "2"
string(1) "3"
string(1) "4"
string(1) "5"
string(1) "6"
string(1) "7"
string(1) "8"
string(1) "9"
string(2) "10"
string(2) "11"
string(2) "12"
string(2) "13"
string(2) "14"
string(2) "15"
string(2) "16"
string(2) "17"
string(2) "18"
string(2) "19"
string(2) "20"
string(2) "21"
string(2) "22"
string(2) "23"
string(2) "24"
string(2) "25"
string(2) "26"
string(2) "27"
string(2) "28"
string(2) "29"
string(2) "30"
string(2) "31"
string(2) "32"
string(2) "33"
string(2) "34"
string(2) "35"
string(2) "36"
string(2) "37"
string(2) "38"
string(2) "39"
string(2) "40"
string(2) "41"
string(2) "42"
string(2) "43"
string(2) "44"
string(2) "45"
string(2) "46"
string(2) "47"
string(2) "48"
string(2) "49"
string(2) "50"
string(2) "51"
string(2) "52"
string(2) "53"
string(2) "54"
string(2) "55"
string(2) "56"
string(2) "57"
string(2) "58"
string(2) "59"
string(2) "60"
string(2) "61"
string(2) "62"
string(2) "63"
string(2) "64"
string(2) "65"
string(2) "66"
string(2) "67"
string(2) "68"
string(2) "69"
string(2) "70"
string(2) "71"
string(2) "72"
string(2) "73"
string(2) "74"
string(2) "75"
string(2) "76"
string(2) "77"
string(2) "78"
string(2) "79"
string(2) "80"
string(2) "81"
string(2) "82"
string(2) "83"
string(2) "84"
string(2) "85"
string(2) "86"
string(2) "87"
string(2) "88"
string(2) "89"
string(2) "90"
string(2) "91"
string(2) "92"
string(2) "93"
string(2) "94"
string(2) "95"
string(2) "96"
string(2) "97"
string(2) "98"
string(2) "99"
string(3) "100"
string(3) "101"
string(3) "102"
string(3) "103"
string(3) "104"
string(3) "105"
string(3) "106"
string(3) "107"
string(3) "108"
string(3) "109"
string(3) "110"
string(3) "111"
string(3) "112"
string(3) "113"
string(3) "114"
string(3) "115"
string(3) "116"
string(3) "117"
string(3) "118"
string(3) "119"
string(3) "120"
string(3) "121"
string(3) "122"
string(3) "123"
string(3) "124"
string(3) "125"
string(3) "126"
string(3) "127"
string(3) "128"
string(3) "129"
string(3) "130"
string(3) "131"
string(3) "132"
string(3) "133"
string(3) "134"
string(3) "135"
string(3) "136"
string(3) "137"
string(3) "138"
string(3) "139"
string(3) "140"
string(3) "141"
string(3) "142"
string(3) "143"
string(3) "144"
string(3) "145"
string(3) "146"
string(3) "147"
string(3) "148"
string(3) "149"
string(3) "150"
string(3) "151"
string(3) "152"
string(3) "153"
string(3) "154"
string(3) "155"
string(3) "156"
string(3) "157"
string(3) "158"
string(3) "159"
string(3) "160"
string(3) "161"
string(3) "162"
string(3) "163"
string(3) "164"
string(3) "165"
string(3) "166"
string(3) "167"
string(3) "168"
string(3) "169"
string(3) "170"
string(3) "171"
string(3) "172"
string(3) "173"
string(3) "174"
string(3) "175"
string(3) "176"
string(3) "177"
string(3) "178"
string(3) "179"
string(3) "180"
string(3) "181"
string(3) "182"
string(3) "183"
string(3) "184"
string(3) "185"
string(3) "186"
string(3) "187"
string(3) "188"
string(3) "189"
string(3) "190"
string(3) "191"
string(3) "192"
string(3) "193"
string(3) "194"
string(3) "195"
string(3) "196"
string(3) "197"
string(3) "198"
string(3) "199"
Done

Diff

100+ string(3) "100"
101+ string(3) "101"
102+ string(3) "102"
103+ string(3) "103"
104+ string(3) "104"
105+ string(3) "105"
106+ string(3) "106"
107+ string(3) "107"
108+ string(3) "108"
109+ string(3) "109"
110+ string(3) "110"
111+ string(3) "111"
112+ string(3) "112"
113+ string(3) "113"
114+ string(3) "114"
115+ string(3) "115"
116+ string(3) "116"
117+ string(3) "117"
118+ string(3) "118"
119+ string(3) "119"
120+ string(3) "120"
121+ string(3) "121"
122+ string(3) "122"
123+ string(3) "123"
124+ string(3) "124"
125+ string(3) "125"
126+ string(3) "126"
127+ string(3) "127"
128+ string(3) "128"
129+ string(3) "129"
130+ string(3) "130"
131+ string(3) "131"
132+ string(3) "132"
133+ string(3) "133"
134+ string(3) "134"
135+ string(3) "135"
136+ string(3) "136"
137+ string(3) "137"
138+ string(3) "138"
139+ string(3) "139"
140+ string(3) "140"
141+ string(3) "141"
142+ string(3) "142"
143+ string(3) "143"
144+ string(3) "144"
145+ string(3) "145"
146+ string(3) "146"
147+ string(3) "147"
148+ string(3) "148"
149+ string(3) "149"
150+ string(3) "150"
151+ string(3) "151"
152+ string(3) "152"
153+ string(3) "153"
154+ string(3) "154"
155+ string(3) "155"
156+ string(3) "156"
157+ string(3) "157"
158+ string(3) "158"
159+ string(3) "159"
160+ string(3) "160"
161+ string(3) "161"
162+ string(3) "162"
163+ string(3) "163"
164+ string(3) "164"
165+ string(3) "165"
166+ string(3) "166"
167+ string(3) "167"
168+ string(3) "168"
169+ string(3) "169"
170+ string(3) "170"
171+ string(3) "171"
172+ string(3) "172"
173+ string(3) "173"
174+ string(3) "174"
175+ string(3) "175"
176+ string(3) "176"
177+ string(3) "177"
178+ string(3) "178"
179+ string(3) "179"
180+ string(3) "180"
181+ string(3) "181"
182+ string(3) "182"
183+ string(3) "183"
184+ string(3) "184"
185+ string(3) "185"
186+ string(3) "186"
187+ string(3) "187"
188+ string(3) "188"
189+ string(3) "189"
190+ string(3) "190"
191+ string(3) "191"
192+ string(3) "192"
193+ string(3) "193"
194+ string(3) "194"
195+ string(3) "195"
196+ string(3) "196"
197+ string(3) "197"
198+ string(3) "198"
199+ string(3) "199"
100- string(2) "10"
101- string(2) "10"
102- string(2) "10"
103- string(2) "10"
104- string(2) "10"
105- string(2) "10"
106- string(2) "10"
107- string(2) "10"
108- string(2) "10"
109- string(2) "10"
110- string(2) "11"
111- string(2) "11"
112- string(2) "11"
113- string(2) "11"
114- string(2) "11"
115- string(2) "11"
116- string(2) "11"
117- string(2) "11"
118- string(2) "11"
119- string(2) "11"
120- string(2) "12"
121- string(2) "12"
122- string(2) "12"
123- string(2) "12"
124- string(2) "12"
125- string(2) "12"
126- string(2) "12"
127- string(2) "12"
128- string(2) "12"
129- string(2) "12"
130- string(2) "13"
131- string(2) "13"
132- string(2) "13"
133- string(2) "13"
134- string(2) "13"
135- string(2) "13"
136- string(2) "13"
137- string(2) "13"
138- string(2) "13"
139- string(2) "13"
140- string(2) "14"
141- string(2) "14"
142- string(2) "14"
143- string(2) "14"
144- string(2) "14"
145- string(2) "14"
146- string(2) "14"
147- string(2) "14"
148- string(2) "14"
149- string(2) "14"
150- string(2) "15"
151- string(2) "15"
152- string(2) "15"
153- string(2) "15"
154- string(2) "15"
155- string(2) "15"
156- string(2) "15"
157- string(2) "15"
158- string(2) "15"
159- string(2) "15"
160- string(2) "16"
161- string(2) "16"
162- string(2) "16"
163- string(2) "16"
164- string(2) "16"
165- string(2) "16"
166- string(2) "16"
167- string(2) "16"
168- string(2) "16"
169- string(2) "16"
170- string(2) "17"
171- string(2) "17"
172- string(2) "17"
173- string(2) "17"
174- string(2) "17"
175- string(2) "17"
176- string(2) "17"
177- string(2) "17"
178- string(2) "17"
179- string(2) "17"
180- string(2) "18"
181- string(2) "18"
182- string(2) "18"
183- string(2) "18"
184- string(2) "18"
185- string(2) "18"
186- string(2) "18"
187- string(2) "18"
188- string(2) "18"
189- string(2) "18"
190- string(2) "19"
191- string(2) "19"
192- string(2) "19"
193- string(2) "19"
194- string(2) "19"
195- string(2) "19"
196- string(2) "19"
197- string(2) "19"
198- string(2) "19"
199- string(2) "19"

 

Generated at Tue, 21 Nov 2017 01:17:01 +0000 (5 hours ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.