1--TEST--
2strcasecmp() function
3--INI--
4precision = 12
5--FILE--
6<?php
7/* Compares two strings in case-insensitive manner */
8
9echo "#### Basic and Possible operations ####";
10/* creating an array of strings to be compared */
11$arrays = array(
12           array("a", 'A', chr(128), chr(255), chr(256)),
13           array("acc", "Acc", 'aC', "acCc", 'acd', "?acc", 'Acc!', "$!acc", ";acc"),
14           array("1", "0", 0, "-1", -1, NULL, null, "", TRUE, true, FALSE, "string"),
15           array(10.5, 1.5, 9.5, 11.5, 100.5, 10.5E1, -10.5, 10, 0.5)
16          );
17
18/* loop through to go each and every element in an array
19	and comparing the elements with one and other */
20foreach($arrays as $str1_arr){
21  echo "\n*** comparing the strings in an \n";
22  print_r($str1_arr);
23  for ($i=0; $i<count($str1_arr); $i++){
24    echo "\nIteration $i\n";
25    for($j=0; $j<count($str1_arr); $j++){
26      echo "- strcasecmp of '$str1_arr[$i]' and '$str1_arr[$j]' is => ";
27      var_dump(strcasecmp($str1_arr[$i], $str1_arr[$j]));
28    }
29  }
30}
31
32
33
34echo "\n#### Testing Miscelleneous inputs ####\n";
35
36echo "--- Testing objects ---\n";
37/* we get "Recoverable fatal error: saying Object of class could not be converted
38   to string" by default when an object is passed instead of string.
39The error can be  avoided by choosing the __toString magix method as follows: */
40
41class string1 {
42  function __toString() {
43    return "Hello, world";
44  }
45}
46$obj_string1 = new string1;
47
48class string2 {
49  function __toString() {
50    return "hello, world\0";
51  }
52}
53$obj_string2 = new string2;
54
55var_dump(strcasecmp("$obj_string1", "$obj_string2"));
56
57
58echo "\n--- Testing arrays ---\n";
59$str_arr = array("hello", "?world", "!$%**()%**[][[[&@#~!");
60var_dump(strcasecmp("hello?world,!$%**()%**[][[[&@#~!",  $str_arr));
61var_dump(strcasecmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[1]"));
62var_dump(strcasecmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[2]"));
63
64echo "\n--- Testing Resources ---\n";
65$filename1 = "dummy.txt";
66$filename2 = "dummy1.txt";
67
68$file1 = fopen($filename1, "w");                // creating new file
69$file2 = fopen($filename2, "w");                // creating new file
70
71/* getting resource type for file handle */
72$string1 = get_resource_type($file1);
73$string2 = get_resource_type($file2);
74$string3 = (int)get_resource_type($file2);
75
76/* string1 and string2 of same "stream" type */
77var_dump(strcasecmp($string1, $string2));            // int(0)
78
79/* string1 is of "stream" type & string3 is of "int" type */
80var_dump(strcasecmp($string1, $string3));            // int(1)
81
82fclose($file1);                                 // closing the file "dummy.txt"
83fclose($file2);                                 // closing the file "dummy1.txt"
84
85unlink("$filename1");                           // deletes "dummy.txt"
86unlink("$filename2");                           // deletes "dummy1.txt"
87
88
89echo "\n--- Testing a longer and heredoc string ---\n";
90$string = <<<EOD
91abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
92abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
93abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
94abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
95abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
96abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
97abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
98@#$%^&**&^%$#@!~:())))((((&&&**%$###@@@!!!~~~~@###$%^&*
99abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
100EOD;
101var_dump(strcasecmp($string, $string));
102var_dump(strcasecmp($string, "xyz0123456789"));
103var_dump(strcasecmp($string, "&&&"));
104
105echo "\n--- Testing a heredoc null string ---\n";
106$str = <<<EOD
107EOD;
108var_dump(strcasecmp($str, "\0"));
109var_dump(strcasecmp($str, NULL));
110var_dump(strcasecmp($str, "0"));
111
112
113echo "\n--- Testing simple and complex syntax strings ---\n";
114$str = 'world';
115
116/* Simple syntax */
117var_dump(strcasecmp("Hello, world", "$str"));
118var_dump(strcasecmp("Hello, world'S", "$str'S"));
119var_dump(strcasecmp("Hello, worldS", "$strS"));
120
121/* String with curly braces, complex syntax */
122var_dump(strcasecmp("Hello, worldS", "${str}S"));
123var_dump(strcasecmp("Hello, worldS", "{$str}S"));
124
125echo "\n--- Testing binary safe and binary chars ---\n";
126var_dump(strcasecmp("Hello\0world", "Hello"));
127var_dump(strcasecmp("Hello\0world", "Helloworld"));
128var_dump(strcasecmp("\x0", "\0"));
129var_dump(strcasecmp("\000", "\0"));
130var_dump(strcasecmp("\x00", ""));
131var_dump(strcasecmp("\x00", NULL));
132var_dump(strcasecmp("\000", NULL));
133
134echo "\n--- Comparing long float values ---\n";
135/* Here two different outputs, which depends on the rounding value
136   before converting to string. Here Precision = 12  */
137var_dump(strcasecmp(10.55555555555555555555555555, 10.5555555556));   // int(0)
138var_dump(strcasecmp(10.55555555555555555555555555, 10.555555556));    // int(-1)
139var_dump(strcasecmp(10.55555555595555555555555555, 10.555555556));    // int(0)
140
141echo "\n#### checking error conditions ####";
142strcasecmp();
143strcasecmp("");
144strcasecmp("HI");
145strcasecmp("Hi", "Hello", "World");
146
147echo "Done\n";
148?>
149--EXPECTF--
150#### Basic and Possible operations ####
151*** comparing the strings in an
152Array
153(
154    [0] => a
155    [1] => A
156    [2] => �
157    [3] => �
158    [4] => �
159)
160
161Iteration 0
162- strcasecmp of 'a' and 'a' is => int(0)
163- strcasecmp of 'a' and 'A' is => int(0)
164- strcasecmp of 'a' and '�' is => int(-%d)
165- strcasecmp of 'a' and '�' is => int(-%d)
166- strcasecmp of 'a' and '�' is => int(%d)
167
168Iteration 1
169- strcasecmp of 'A' and 'a' is => int(0)
170- strcasecmp of 'A' and 'A' is => int(0)
171- strcasecmp of 'A' and '�' is => int(-%d)
172- strcasecmp of 'A' and '�' is => int(-%d)
173- strcasecmp of 'A' and '�' is => int(%d)
174
175Iteration 2
176- strcasecmp of '�' and 'a' is => int(%d)
177- strcasecmp of '�' and 'A' is => int(%d)
178- strcasecmp of '�' and '�' is => int(0)
179- strcasecmp of '�' and '�' is => int(-%d)
180- strcasecmp of '�' and '�' is => int(%d)
181
182Iteration 3
183- strcasecmp of '�' and 'a' is => int(%d)
184- strcasecmp of '�' and 'A' is => int(%d)
185- strcasecmp of '�' and '�' is => int(%d)
186- strcasecmp of '�' and '�' is => int(0)
187- strcasecmp of '�' and '�' is => int(%d)
188
189Iteration 4
190- strcasecmp of '�' and 'a' is => int(-%d)
191- strcasecmp of '�' and 'A' is => int(-%d)
192- strcasecmp of '�' and '�' is => int(-%d)
193- strcasecmp of '�' and '�' is => int(-%d)
194- strcasecmp of '�' and '�' is => int(0)
195
196*** comparing the strings in an
197Array
198(
199    [0] => acc
200    [1] => Acc
201    [2] => aC
202    [3] => acCc
203    [4] => acd
204    [5] => ?acc
205    [6] => Acc!
206    [7] => $!acc
207    [8] => ;acc
208)
209
210Iteration 0
211- strcasecmp of 'acc' and 'acc' is => int(0)
212- strcasecmp of 'acc' and 'Acc' is => int(0)
213- strcasecmp of 'acc' and 'aC' is => int(%d)
214- strcasecmp of 'acc' and 'acCc' is => int(-%d)
215- strcasecmp of 'acc' and 'acd' is => int(-%d)
216- strcasecmp of 'acc' and '?acc' is => int(%d)
217- strcasecmp of 'acc' and 'Acc!' is => int(-%d)
218- strcasecmp of 'acc' and '$!acc' is => int(%d)
219- strcasecmp of 'acc' and ';acc' is => int(%d)
220
221Iteration 1
222- strcasecmp of 'Acc' and 'acc' is => int(0)
223- strcasecmp of 'Acc' and 'Acc' is => int(0)
224- strcasecmp of 'Acc' and 'aC' is => int(%d)
225- strcasecmp of 'Acc' and 'acCc' is => int(-%d)
226- strcasecmp of 'Acc' and 'acd' is => int(-%d)
227- strcasecmp of 'Acc' and '?acc' is => int(%d)
228- strcasecmp of 'Acc' and 'Acc!' is => int(-%d)
229- strcasecmp of 'Acc' and '$!acc' is => int(%d)
230- strcasecmp of 'Acc' and ';acc' is => int(%d)
231
232Iteration 2
233- strcasecmp of 'aC' and 'acc' is => int(-%d)
234- strcasecmp of 'aC' and 'Acc' is => int(-%d)
235- strcasecmp of 'aC' and 'aC' is => int(0)
236- strcasecmp of 'aC' and 'acCc' is => int(-%d)
237- strcasecmp of 'aC' and 'acd' is => int(-%d)
238- strcasecmp of 'aC' and '?acc' is => int(%d)
239- strcasecmp of 'aC' and 'Acc!' is => int(-%d)
240- strcasecmp of 'aC' and '$!acc' is => int(%d)
241- strcasecmp of 'aC' and ';acc' is => int(%d)
242
243Iteration 3
244- strcasecmp of 'acCc' and 'acc' is => int(%d)
245- strcasecmp of 'acCc' and 'Acc' is => int(%d)
246- strcasecmp of 'acCc' and 'aC' is => int(%d)
247- strcasecmp of 'acCc' and 'acCc' is => int(0)
248- strcasecmp of 'acCc' and 'acd' is => int(-%d)
249- strcasecmp of 'acCc' and '?acc' is => int(%d)
250- strcasecmp of 'acCc' and 'Acc!' is => int(%d)
251- strcasecmp of 'acCc' and '$!acc' is => int(%d)
252- strcasecmp of 'acCc' and ';acc' is => int(%d)
253
254Iteration 4
255- strcasecmp of 'acd' and 'acc' is => int(%d)
256- strcasecmp of 'acd' and 'Acc' is => int(%d)
257- strcasecmp of 'acd' and 'aC' is => int(%d)
258- strcasecmp of 'acd' and 'acCc' is => int(%d)
259- strcasecmp of 'acd' and 'acd' is => int(0)
260- strcasecmp of 'acd' and '?acc' is => int(%d)
261- strcasecmp of 'acd' and 'Acc!' is => int(%d)
262- strcasecmp of 'acd' and '$!acc' is => int(%d)
263- strcasecmp of 'acd' and ';acc' is => int(%d)
264
265Iteration 5
266- strcasecmp of '?acc' and 'acc' is => int(-%d)
267- strcasecmp of '?acc' and 'Acc' is => int(-%d)
268- strcasecmp of '?acc' and 'aC' is => int(-%d)
269- strcasecmp of '?acc' and 'acCc' is => int(-%d)
270- strcasecmp of '?acc' and 'acd' is => int(-%d)
271- strcasecmp of '?acc' and '?acc' is => int(0)
272- strcasecmp of '?acc' and 'Acc!' is => int(-%d)
273- strcasecmp of '?acc' and '$!acc' is => int(%d)
274- strcasecmp of '?acc' and ';acc' is => int(%d)
275
276Iteration 6
277- strcasecmp of 'Acc!' and 'acc' is => int(%d)
278- strcasecmp of 'Acc!' and 'Acc' is => int(%d)
279- strcasecmp of 'Acc!' and 'aC' is => int(%d)
280- strcasecmp of 'Acc!' and 'acCc' is => int(-%d)
281- strcasecmp of 'Acc!' and 'acd' is => int(-%d)
282- strcasecmp of 'Acc!' and '?acc' is => int(%d)
283- strcasecmp of 'Acc!' and 'Acc!' is => int(0)
284- strcasecmp of 'Acc!' and '$!acc' is => int(%d)
285- strcasecmp of 'Acc!' and ';acc' is => int(%d)
286
287Iteration 7
288- strcasecmp of '$!acc' and 'acc' is => int(-%d)
289- strcasecmp of '$!acc' and 'Acc' is => int(-%d)
290- strcasecmp of '$!acc' and 'aC' is => int(-%d)
291- strcasecmp of '$!acc' and 'acCc' is => int(-%d)
292- strcasecmp of '$!acc' and 'acd' is => int(-%d)
293- strcasecmp of '$!acc' and '?acc' is => int(-%d)
294- strcasecmp of '$!acc' and 'Acc!' is => int(-%d)
295- strcasecmp of '$!acc' and '$!acc' is => int(0)
296- strcasecmp of '$!acc' and ';acc' is => int(-%d)
297
298Iteration 8
299- strcasecmp of ';acc' and 'acc' is => int(-%d)
300- strcasecmp of ';acc' and 'Acc' is => int(-%d)
301- strcasecmp of ';acc' and 'aC' is => int(-%d)
302- strcasecmp of ';acc' and 'acCc' is => int(-%d)
303- strcasecmp of ';acc' and 'acd' is => int(-%d)
304- strcasecmp of ';acc' and '?acc' is => int(-%d)
305- strcasecmp of ';acc' and 'Acc!' is => int(-%d)
306- strcasecmp of ';acc' and '$!acc' is => int(%d)
307- strcasecmp of ';acc' and ';acc' is => int(0)
308
309*** comparing the strings in an
310Array
311(
312    [0] => 1
313    [1] => 0
314    [2] => 0
315    [3] => -1
316    [4] => -1
317    [5] =>
318    [6] =>
319    [7] =>
320    [8] => 1
321    [9] => 1
322    [10] =>
323    [11] => string
324)
325
326Iteration 0
327- strcasecmp of '1' and '1' is => int(0)
328- strcasecmp of '1' and '0' is => int(%d)
329- strcasecmp of '1' and '0' is => int(%d)
330- strcasecmp of '1' and '-1' is => int(%d)
331- strcasecmp of '1' and '-1' is => int(%d)
332- strcasecmp of '1' and '' is => int(%d)
333- strcasecmp of '1' and '' is => int(%d)
334- strcasecmp of '1' and '' is => int(%d)
335- strcasecmp of '1' and '1' is => int(0)
336- strcasecmp of '1' and '1' is => int(0)
337- strcasecmp of '1' and '' is => int(%d)
338- strcasecmp of '1' and 'string' is => int(-%d)
339
340Iteration 1
341- strcasecmp of '0' and '1' is => int(-%d)
342- strcasecmp of '0' and '0' is => int(0)
343- strcasecmp of '0' and '0' is => int(0)
344- strcasecmp of '0' and '-1' is => int(%d)
345- strcasecmp of '0' and '-1' is => int(%d)
346- strcasecmp of '0' and '' is => int(%d)
347- strcasecmp of '0' and '' is => int(%d)
348- strcasecmp of '0' and '' is => int(%d)
349- strcasecmp of '0' and '1' is => int(-%d)
350- strcasecmp of '0' and '1' is => int(-%d)
351- strcasecmp of '0' and '' is => int(%d)
352- strcasecmp of '0' and 'string' is => int(-%d)
353
354Iteration 2
355- strcasecmp of '0' and '1' is => int(-%d)
356- strcasecmp of '0' and '0' is => int(0)
357- strcasecmp of '0' and '0' is => int(0)
358- strcasecmp of '0' and '-1' is => int(%d)
359- strcasecmp of '0' and '-1' is => int(%d)
360- strcasecmp of '0' and '' is => int(%d)
361- strcasecmp of '0' and '' is => int(%d)
362- strcasecmp of '0' and '' is => int(%d)
363- strcasecmp of '0' and '1' is => int(-%d)
364- strcasecmp of '0' and '1' is => int(-%d)
365- strcasecmp of '0' and '' is => int(%d)
366- strcasecmp of '0' and 'string' is => int(-%d)
367
368Iteration 3
369- strcasecmp of '-1' and '1' is => int(-%d)
370- strcasecmp of '-1' and '0' is => int(-%d)
371- strcasecmp of '-1' and '0' is => int(-%d)
372- strcasecmp of '-1' and '-1' is => int(0)
373- strcasecmp of '-1' and '-1' is => int(0)
374- strcasecmp of '-1' and '' is => int(%d)
375- strcasecmp of '-1' and '' is => int(%d)
376- strcasecmp of '-1' and '' is => int(%d)
377- strcasecmp of '-1' and '1' is => int(-%d)
378- strcasecmp of '-1' and '1' is => int(-%d)
379- strcasecmp of '-1' and '' is => int(%d)
380- strcasecmp of '-1' and 'string' is => int(-%d)
381
382Iteration 4
383- strcasecmp of '-1' and '1' is => int(-%d)
384- strcasecmp of '-1' and '0' is => int(-%d)
385- strcasecmp of '-1' and '0' is => int(-%d)
386- strcasecmp of '-1' and '-1' is => int(0)
387- strcasecmp of '-1' and '-1' is => int(0)
388- strcasecmp of '-1' and '' is => int(%d)
389- strcasecmp of '-1' and '' is => int(%d)
390- strcasecmp of '-1' and '' is => int(%d)
391- strcasecmp of '-1' and '1' is => int(-%d)
392- strcasecmp of '-1' and '1' is => int(-%d)
393- strcasecmp of '-1' and '' is => int(%d)
394- strcasecmp of '-1' and 'string' is => int(-%d)
395
396Iteration 5
397- strcasecmp of '' and '1' is => int(-%d)
398- strcasecmp of '' and '0' is => int(-%d)
399- strcasecmp of '' and '0' is => int(-%d)
400- strcasecmp of '' and '-1' is => int(-%d)
401- strcasecmp of '' and '-1' is => int(-%d)
402- strcasecmp of '' and '' is => int(0)
403- strcasecmp of '' and '' is => int(0)
404- strcasecmp of '' and '' is => int(0)
405- strcasecmp of '' and '1' is => int(-%d)
406- strcasecmp of '' and '1' is => int(-%d)
407- strcasecmp of '' and '' is => int(0)
408- strcasecmp of '' and 'string' is => int(-%d)
409
410Iteration 6
411- strcasecmp of '' and '1' is => int(-%d)
412- strcasecmp of '' and '0' is => int(-%d)
413- strcasecmp of '' and '0' is => int(-%d)
414- strcasecmp of '' and '-1' is => int(-%d)
415- strcasecmp of '' and '-1' is => int(-%d)
416- strcasecmp of '' and '' is => int(0)
417- strcasecmp of '' and '' is => int(0)
418- strcasecmp of '' and '' is => int(0)
419- strcasecmp of '' and '1' is => int(-%d)
420- strcasecmp of '' and '1' is => int(-%d)
421- strcasecmp of '' and '' is => int(0)
422- strcasecmp of '' and 'string' is => int(-%d)
423
424Iteration 7
425- strcasecmp of '' and '1' is => int(-%d)
426- strcasecmp of '' and '0' is => int(-%d)
427- strcasecmp of '' and '0' is => int(-%d)
428- strcasecmp of '' and '-1' is => int(-%d)
429- strcasecmp of '' and '-1' is => int(-%d)
430- strcasecmp of '' and '' is => int(0)
431- strcasecmp of '' and '' is => int(0)
432- strcasecmp of '' and '' is => int(0)
433- strcasecmp of '' and '1' is => int(-%d)
434- strcasecmp of '' and '1' is => int(-%d)
435- strcasecmp of '' and '' is => int(0)
436- strcasecmp of '' and 'string' is => int(-%d)
437
438Iteration 8
439- strcasecmp of '1' and '1' is => int(0)
440- strcasecmp of '1' and '0' is => int(%d)
441- strcasecmp of '1' and '0' is => int(%d)
442- strcasecmp of '1' and '-1' is => int(%d)
443- strcasecmp of '1' and '-1' is => int(%d)
444- strcasecmp of '1' and '' is => int(%d)
445- strcasecmp of '1' and '' is => int(%d)
446- strcasecmp of '1' and '' is => int(%d)
447- strcasecmp of '1' and '1' is => int(0)
448- strcasecmp of '1' and '1' is => int(0)
449- strcasecmp of '1' and '' is => int(%d)
450- strcasecmp of '1' and 'string' is => int(-%d)
451
452Iteration 9
453- strcasecmp of '1' and '1' is => int(0)
454- strcasecmp of '1' and '0' is => int(%d)
455- strcasecmp of '1' and '0' is => int(%d)
456- strcasecmp of '1' and '-1' is => int(%d)
457- strcasecmp of '1' and '-1' is => int(%d)
458- strcasecmp of '1' and '' is => int(%d)
459- strcasecmp of '1' and '' is => int(%d)
460- strcasecmp of '1' and '' is => int(%d)
461- strcasecmp of '1' and '1' is => int(0)
462- strcasecmp of '1' and '1' is => int(0)
463- strcasecmp of '1' and '' is => int(%d)
464- strcasecmp of '1' and 'string' is => int(-%d)
465
466Iteration 10
467- strcasecmp of '' and '1' is => int(-%d)
468- strcasecmp of '' and '0' is => int(-%d)
469- strcasecmp of '' and '0' is => int(-%d)
470- strcasecmp of '' and '-1' is => int(-%d)
471- strcasecmp of '' and '-1' is => int(-%d)
472- strcasecmp of '' and '' is => int(0)
473- strcasecmp of '' and '' is => int(0)
474- strcasecmp of '' and '' is => int(0)
475- strcasecmp of '' and '1' is => int(-%d)
476- strcasecmp of '' and '1' is => int(-%d)
477- strcasecmp of '' and '' is => int(0)
478- strcasecmp of '' and 'string' is => int(-%d)
479
480Iteration 11
481- strcasecmp of 'string' and '1' is => int(%d)
482- strcasecmp of 'string' and '0' is => int(%d)
483- strcasecmp of 'string' and '0' is => int(%d)
484- strcasecmp of 'string' and '-1' is => int(%d)
485- strcasecmp of 'string' and '-1' is => int(%d)
486- strcasecmp of 'string' and '' is => int(%d)
487- strcasecmp of 'string' and '' is => int(%d)
488- strcasecmp of 'string' and '' is => int(%d)
489- strcasecmp of 'string' and '1' is => int(%d)
490- strcasecmp of 'string' and '1' is => int(%d)
491- strcasecmp of 'string' and '' is => int(%d)
492- strcasecmp of 'string' and 'string' is => int(0)
493
494*** comparing the strings in an
495Array
496(
497    [0] => 10.5
498    [1] => 1.5
499    [2] => 9.5
500    [3] => 11.5
501    [4] => 100.5
502    [5] => 105
503    [6] => -10.5
504    [7] => 10
505    [8] => 0.5
506)
507
508Iteration 0
509- strcasecmp of '10.5' and '10.5' is => int(0)
510- strcasecmp of '10.5' and '1.5' is => int(%d)
511- strcasecmp of '10.5' and '9.5' is => int(-%d)
512- strcasecmp of '10.5' and '11.5' is => int(-%d)
513- strcasecmp of '10.5' and '100.5' is => int(-%d)
514- strcasecmp of '10.5' and '105' is => int(-%d)
515- strcasecmp of '10.5' and '-10.5' is => int(%d)
516- strcasecmp of '10.5' and '10' is => int(%d)
517- strcasecmp of '10.5' and '0.5' is => int(%d)
518
519Iteration 1
520- strcasecmp of '1.5' and '10.5' is => int(-%d)
521- strcasecmp of '1.5' and '1.5' is => int(0)
522- strcasecmp of '1.5' and '9.5' is => int(-%d)
523- strcasecmp of '1.5' and '11.5' is => int(-%d)
524- strcasecmp of '1.5' and '100.5' is => int(-%d)
525- strcasecmp of '1.5' and '105' is => int(-%d)
526- strcasecmp of '1.5' and '-10.5' is => int(%d)
527- strcasecmp of '1.5' and '10' is => int(-%d)
528- strcasecmp of '1.5' and '0.5' is => int(%d)
529
530Iteration 2
531- strcasecmp of '9.5' and '10.5' is => int(%d)
532- strcasecmp of '9.5' and '1.5' is => int(%d)
533- strcasecmp of '9.5' and '9.5' is => int(0)
534- strcasecmp of '9.5' and '11.5' is => int(%d)
535- strcasecmp of '9.5' and '100.5' is => int(%d)
536- strcasecmp of '9.5' and '105' is => int(%d)
537- strcasecmp of '9.5' and '-10.5' is => int(%d)
538- strcasecmp of '9.5' and '10' is => int(%d)
539- strcasecmp of '9.5' and '0.5' is => int(%d)
540
541Iteration 3
542- strcasecmp of '11.5' and '10.5' is => int(%d)
543- strcasecmp of '11.5' and '1.5' is => int(%d)
544- strcasecmp of '11.5' and '9.5' is => int(-%d)
545- strcasecmp of '11.5' and '11.5' is => int(0)
546- strcasecmp of '11.5' and '100.5' is => int(%d)
547- strcasecmp of '11.5' and '105' is => int(%d)
548- strcasecmp of '11.5' and '-10.5' is => int(%d)
549- strcasecmp of '11.5' and '10' is => int(%d)
550- strcasecmp of '11.5' and '0.5' is => int(%d)
551
552Iteration 4
553- strcasecmp of '100.5' and '10.5' is => int(%d)
554- strcasecmp of '100.5' and '1.5' is => int(%d)
555- strcasecmp of '100.5' and '9.5' is => int(-%d)
556- strcasecmp of '100.5' and '11.5' is => int(-%d)
557- strcasecmp of '100.5' and '100.5' is => int(0)
558- strcasecmp of '100.5' and '105' is => int(-%d)
559- strcasecmp of '100.5' and '-10.5' is => int(%d)
560- strcasecmp of '100.5' and '10' is => int(%d)
561- strcasecmp of '100.5' and '0.5' is => int(%d)
562
563Iteration 5
564- strcasecmp of '105' and '10.5' is => int(%d)
565- strcasecmp of '105' and '1.5' is => int(%d)
566- strcasecmp of '105' and '9.5' is => int(-%d)
567- strcasecmp of '105' and '11.5' is => int(-%d)
568- strcasecmp of '105' and '100.5' is => int(%d)
569- strcasecmp of '105' and '105' is => int(0)
570- strcasecmp of '105' and '-10.5' is => int(%d)
571- strcasecmp of '105' and '10' is => int(%d)
572- strcasecmp of '105' and '0.5' is => int(%d)
573
574Iteration 6
575- strcasecmp of '-10.5' and '10.5' is => int(-%d)
576- strcasecmp of '-10.5' and '1.5' is => int(-%d)
577- strcasecmp of '-10.5' and '9.5' is => int(-%d)
578- strcasecmp of '-10.5' and '11.5' is => int(-%d)
579- strcasecmp of '-10.5' and '100.5' is => int(-%d)
580- strcasecmp of '-10.5' and '105' is => int(-%d)
581- strcasecmp of '-10.5' and '-10.5' is => int(0)
582- strcasecmp of '-10.5' and '10' is => int(-%d)
583- strcasecmp of '-10.5' and '0.5' is => int(-%d)
584
585Iteration 7
586- strcasecmp of '10' and '10.5' is => int(-%d)
587- strcasecmp of '10' and '1.5' is => int(%d)
588- strcasecmp of '10' and '9.5' is => int(-%d)
589- strcasecmp of '10' and '11.5' is => int(-%d)
590- strcasecmp of '10' and '100.5' is => int(-%d)
591- strcasecmp of '10' and '105' is => int(-%d)
592- strcasecmp of '10' and '-10.5' is => int(%d)
593- strcasecmp of '10' and '10' is => int(0)
594- strcasecmp of '10' and '0.5' is => int(%d)
595
596Iteration 8
597- strcasecmp of '0.5' and '10.5' is => int(-%d)
598- strcasecmp of '0.5' and '1.5' is => int(-%d)
599- strcasecmp of '0.5' and '9.5' is => int(-%d)
600- strcasecmp of '0.5' and '11.5' is => int(-%d)
601- strcasecmp of '0.5' and '100.5' is => int(-%d)
602- strcasecmp of '0.5' and '105' is => int(-%d)
603- strcasecmp of '0.5' and '-10.5' is => int(%d)
604- strcasecmp of '0.5' and '10' is => int(-%d)
605- strcasecmp of '0.5' and '0.5' is => int(0)
606
607#### Testing Miscelleneous inputs ####
608--- Testing objects ---
609int(-%d)
610
611--- Testing arrays ---
612
613Warning: strcasecmp() expects parameter 2 to be string, array given in %s on line %d
614NULL
615int(%d)
616int(%d)
617
618--- Testing Resources ---
619int(0)
620int(%d)
621
622--- Testing a longer and heredoc string ---
623int(0)
624int(-%d)
625int(%d)
626
627--- Testing a heredoc null string ---
628int(-%d)
629int(0)
630int(-%d)
631
632--- Testing simple and complex syntax strings ---
633int(-%d)
634int(-%d)
635
636Notice: Undefined variable: strS in %s on line %d
637int(%d)
638int(-%d)
639int(-%d)
640
641--- Testing binary safe and binary chars ---
642int(%d)
643int(-%d)
644int(0)
645int(0)
646int(%d)
647int(%d)
648int(%d)
649
650--- Comparing long float values ---
651int(0)
652int(-%d)
653int(0)
654
655#### checking error conditions ####
656Warning: strcasecmp() expects exactly 2 parameters, 0 given in %s on line %d
657
658Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d
659
660Warning: strcasecmp() expects exactly 2 parameters, 1 given in %s on line %d
661
662Warning: strcasecmp() expects exactly 2 parameters, 3 given in %s on line %d
663Done
664