strcasecmp.phpt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. --TEST--
  2. strcasecmp() function
  3. --INI--
  4. precision = 12
  5. --FILE--
  6. <?php
  7. /* Compares two strings in case-insensitive manner */
  8. echo "#### Basic and Possible operations ####";
  9. /* creating an array of strings to be compared */
  10. $arrays = array(
  11. array("a", 'A', chr(128), chr(255), chr(256)),
  12. array("acc", "Acc", 'aC', "acCc", 'acd', "?acc", 'Acc!', "$!acc", ";acc"),
  13. array("1", "0", 0, "-1", -1, "", TRUE, true, FALSE, "string"),
  14. array(10.5, 1.5, 9.5, 11.5, 100.5, 10.5E1, -10.5, 10, 0.5)
  15. );
  16. /* loop through to go each and every element in an array
  17. and comparing the elements with one and other */
  18. foreach($arrays as $str1_arr){
  19. echo "\n*** comparing the strings in an \n";
  20. print_r($str1_arr);
  21. for ($i=0; $i<count($str1_arr); $i++){
  22. echo "\nIteration $i\n";
  23. for($j=0; $j<count($str1_arr); $j++){
  24. echo "- strcasecmp of '$str1_arr[$i]' and '$str1_arr[$j]' is => ";
  25. var_dump(strcasecmp($str1_arr[$i], $str1_arr[$j]));
  26. }
  27. }
  28. }
  29. echo "\n#### Testing miscellaneous inputs ####\n";
  30. echo "--- Testing objects ---\n";
  31. /* we get "Recoverable fatal error: saying Object of class could not be converted
  32. to string" by default when an object is passed instead of string.
  33. The error can be avoided by choosing the __toString magix method as follows: */
  34. class string1 {
  35. function __toString() {
  36. return "Hello, world";
  37. }
  38. }
  39. $obj_string1 = new string1;
  40. class string2 {
  41. function __toString() {
  42. return "hello, world\0";
  43. }
  44. }
  45. $obj_string2 = new string2;
  46. var_dump(strcasecmp("$obj_string1", "$obj_string2"));
  47. echo "\n--- Testing arrays ---\n";
  48. $str_arr = array("hello", "?world", "!$%**()%**[][[[&@#~!");
  49. var_dump(strcasecmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[1]"));
  50. var_dump(strcasecmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[2]"));
  51. echo "\n--- Testing a longer and heredoc string ---\n";
  52. $string = <<<EOD
  53. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  54. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  55. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  56. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  57. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  58. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  59. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  60. @#$%^&**&^%$#@!~:())))((((&&&**%$###@@@!!!~~~~@###$%^&*
  61. abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
  62. EOD;
  63. var_dump(strcasecmp($string, $string));
  64. var_dump(strcasecmp($string, "xyz0123456789"));
  65. var_dump(strcasecmp($string, "&&&"));
  66. echo "\n--- Testing a heredoc null string ---\n";
  67. $str = <<<EOD
  68. EOD;
  69. var_dump(strcasecmp($str, "\0"));
  70. var_dump(strcasecmp($str, "0"));
  71. echo "\n--- Testing simple and complex syntax strings ---\n";
  72. $str = 'world';
  73. /* Simple syntax */
  74. var_dump(strcasecmp("Hello, world", "$str"));
  75. var_dump(strcasecmp("Hello, world'S", "$str'S"));
  76. var_dump(strcasecmp("Hello, worldS", "$strS"));
  77. /* String with curly braces, complex syntax */
  78. var_dump(strcasecmp("Hello, worldS", "${str}S"));
  79. var_dump(strcasecmp("Hello, worldS", "{$str}S"));
  80. echo "\n--- Testing binary safe and binary chars ---\n";
  81. var_dump(strcasecmp("Hello\0world", "Hello"));
  82. var_dump(strcasecmp("Hello\0world", "Helloworld"));
  83. var_dump(strcasecmp("\x0", "\0"));
  84. var_dump(strcasecmp("\000", "\0"));
  85. var_dump(strcasecmp("\x00", ""));
  86. echo "\n--- Comparing long float values ---\n";
  87. /* Here two different outputs, which depends on the rounding value
  88. before converting to string. Here Precision = 12 */
  89. var_dump(strcasecmp(10.55555555555555555555555555, 10.5555555556)); // int(0)
  90. var_dump(strcasecmp(10.55555555555555555555555555, 10.555555556)); // int(-1)
  91. var_dump(strcasecmp(10.55555555595555555555555555, 10.555555556)); // int(0)
  92. echo "Done\n";
  93. ?>
  94. --EXPECTF--
  95. #### Basic and Possible operations ####
  96. *** comparing the strings in an
  97. Array
  98. (
  99. [0] => a
  100. [1] => A
  101. [2] => €
  102. [3] => ÿ
  103. [4] => %0
  104. )
  105. Iteration 0
  106. - strcasecmp of 'a' and 'a' is => int(0)
  107. - strcasecmp of 'a' and 'A' is => int(0)
  108. - strcasecmp of 'a' and '€' is => int(-%d)
  109. - strcasecmp of 'a' and 'ÿ' is => int(-%d)
  110. - strcasecmp of 'a' and '%0' is => int(%d)
  111. Iteration 1
  112. - strcasecmp of 'A' and 'a' is => int(0)
  113. - strcasecmp of 'A' and 'A' is => int(0)
  114. - strcasecmp of 'A' and '€' is => int(-%d)
  115. - strcasecmp of 'A' and 'ÿ' is => int(-%d)
  116. - strcasecmp of 'A' and '%0' is => int(%d)
  117. Iteration 2
  118. - strcasecmp of '€' and 'a' is => int(%d)
  119. - strcasecmp of '€' and 'A' is => int(%d)
  120. - strcasecmp of '€' and '€' is => int(0)
  121. - strcasecmp of '€' and 'ÿ' is => int(-%d)
  122. - strcasecmp of '€' and '%0' is => int(%d)
  123. Iteration 3
  124. - strcasecmp of 'ÿ' and 'a' is => int(%d)
  125. - strcasecmp of 'ÿ' and 'A' is => int(%d)
  126. - strcasecmp of 'ÿ' and '€' is => int(%d)
  127. - strcasecmp of 'ÿ' and 'ÿ' is => int(0)
  128. - strcasecmp of 'ÿ' and '%0' is => int(%d)
  129. Iteration 4
  130. - strcasecmp of '%0' and 'a' is => int(-%d)
  131. - strcasecmp of '%0' and 'A' is => int(-%d)
  132. - strcasecmp of '%0' and '€' is => int(-%d)
  133. - strcasecmp of '%0' and 'ÿ' is => int(-%d)
  134. - strcasecmp of '%0' and '%0' is => int(0)
  135. *** comparing the strings in an
  136. Array
  137. (
  138. [0] => acc
  139. [1] => Acc
  140. [2] => aC
  141. [3] => acCc
  142. [4] => acd
  143. [5] => ?acc
  144. [6] => Acc!
  145. [7] => $!acc
  146. [8] => ;acc
  147. )
  148. Iteration 0
  149. - strcasecmp of 'acc' and 'acc' is => int(0)
  150. - strcasecmp of 'acc' and 'Acc' is => int(0)
  151. - strcasecmp of 'acc' and 'aC' is => int(%d)
  152. - strcasecmp of 'acc' and 'acCc' is => int(-%d)
  153. - strcasecmp of 'acc' and 'acd' is => int(-%d)
  154. - strcasecmp of 'acc' and '?acc' is => int(%d)
  155. - strcasecmp of 'acc' and 'Acc!' is => int(-%d)
  156. - strcasecmp of 'acc' and '$!acc' is => int(%d)
  157. - strcasecmp of 'acc' and ';acc' is => int(%d)
  158. Iteration 1
  159. - strcasecmp of 'Acc' and 'acc' is => int(0)
  160. - strcasecmp of 'Acc' and 'Acc' is => int(0)
  161. - strcasecmp of 'Acc' and 'aC' is => int(%d)
  162. - strcasecmp of 'Acc' and 'acCc' is => int(-%d)
  163. - strcasecmp of 'Acc' and 'acd' is => int(-%d)
  164. - strcasecmp of 'Acc' and '?acc' is => int(%d)
  165. - strcasecmp of 'Acc' and 'Acc!' is => int(-%d)
  166. - strcasecmp of 'Acc' and '$!acc' is => int(%d)
  167. - strcasecmp of 'Acc' and ';acc' is => int(%d)
  168. Iteration 2
  169. - strcasecmp of 'aC' and 'acc' is => int(-%d)
  170. - strcasecmp of 'aC' and 'Acc' is => int(-%d)
  171. - strcasecmp of 'aC' and 'aC' is => int(0)
  172. - strcasecmp of 'aC' and 'acCc' is => int(-%d)
  173. - strcasecmp of 'aC' and 'acd' is => int(-%d)
  174. - strcasecmp of 'aC' and '?acc' is => int(%d)
  175. - strcasecmp of 'aC' and 'Acc!' is => int(-%d)
  176. - strcasecmp of 'aC' and '$!acc' is => int(%d)
  177. - strcasecmp of 'aC' and ';acc' is => int(%d)
  178. Iteration 3
  179. - strcasecmp of 'acCc' and 'acc' is => int(%d)
  180. - strcasecmp of 'acCc' and 'Acc' is => int(%d)
  181. - strcasecmp of 'acCc' and 'aC' is => int(%d)
  182. - strcasecmp of 'acCc' and 'acCc' is => int(0)
  183. - strcasecmp of 'acCc' and 'acd' is => int(-%d)
  184. - strcasecmp of 'acCc' and '?acc' is => int(%d)
  185. - strcasecmp of 'acCc' and 'Acc!' is => int(%d)
  186. - strcasecmp of 'acCc' and '$!acc' is => int(%d)
  187. - strcasecmp of 'acCc' and ';acc' is => int(%d)
  188. Iteration 4
  189. - strcasecmp of 'acd' and 'acc' is => int(%d)
  190. - strcasecmp of 'acd' and 'Acc' is => int(%d)
  191. - strcasecmp of 'acd' and 'aC' is => int(%d)
  192. - strcasecmp of 'acd' and 'acCc' is => int(%d)
  193. - strcasecmp of 'acd' and 'acd' is => int(0)
  194. - strcasecmp of 'acd' and '?acc' is => int(%d)
  195. - strcasecmp of 'acd' and 'Acc!' is => int(%d)
  196. - strcasecmp of 'acd' and '$!acc' is => int(%d)
  197. - strcasecmp of 'acd' and ';acc' is => int(%d)
  198. Iteration 5
  199. - strcasecmp of '?acc' and 'acc' is => int(-%d)
  200. - strcasecmp of '?acc' and 'Acc' is => int(-%d)
  201. - strcasecmp of '?acc' and 'aC' is => int(-%d)
  202. - strcasecmp of '?acc' and 'acCc' is => int(-%d)
  203. - strcasecmp of '?acc' and 'acd' is => int(-%d)
  204. - strcasecmp of '?acc' and '?acc' is => int(0)
  205. - strcasecmp of '?acc' and 'Acc!' is => int(-%d)
  206. - strcasecmp of '?acc' and '$!acc' is => int(%d)
  207. - strcasecmp of '?acc' and ';acc' is => int(%d)
  208. Iteration 6
  209. - strcasecmp of 'Acc!' and 'acc' is => int(%d)
  210. - strcasecmp of 'Acc!' and 'Acc' is => int(%d)
  211. - strcasecmp of 'Acc!' and 'aC' is => int(%d)
  212. - strcasecmp of 'Acc!' and 'acCc' is => int(-%d)
  213. - strcasecmp of 'Acc!' and 'acd' is => int(-%d)
  214. - strcasecmp of 'Acc!' and '?acc' is => int(%d)
  215. - strcasecmp of 'Acc!' and 'Acc!' is => int(0)
  216. - strcasecmp of 'Acc!' and '$!acc' is => int(%d)
  217. - strcasecmp of 'Acc!' and ';acc' is => int(%d)
  218. Iteration 7
  219. - strcasecmp of '$!acc' and 'acc' is => int(-%d)
  220. - strcasecmp of '$!acc' and 'Acc' is => int(-%d)
  221. - strcasecmp of '$!acc' and 'aC' is => int(-%d)
  222. - strcasecmp of '$!acc' and 'acCc' is => int(-%d)
  223. - strcasecmp of '$!acc' and 'acd' is => int(-%d)
  224. - strcasecmp of '$!acc' and '?acc' is => int(-%d)
  225. - strcasecmp of '$!acc' and 'Acc!' is => int(-%d)
  226. - strcasecmp of '$!acc' and '$!acc' is => int(0)
  227. - strcasecmp of '$!acc' and ';acc' is => int(-%d)
  228. Iteration 8
  229. - strcasecmp of ';acc' and 'acc' is => int(-%d)
  230. - strcasecmp of ';acc' and 'Acc' is => int(-%d)
  231. - strcasecmp of ';acc' and 'aC' is => int(-%d)
  232. - strcasecmp of ';acc' and 'acCc' is => int(-%d)
  233. - strcasecmp of ';acc' and 'acd' is => int(-%d)
  234. - strcasecmp of ';acc' and '?acc' is => int(-%d)
  235. - strcasecmp of ';acc' and 'Acc!' is => int(-%d)
  236. - strcasecmp of ';acc' and '$!acc' is => int(%d)
  237. - strcasecmp of ';acc' and ';acc' is => int(0)
  238. *** comparing the strings in an
  239. Array
  240. (
  241. [0] => 1
  242. [1] => 0
  243. [2] => 0
  244. [3] => -1
  245. [4] => -1
  246. [5] =>
  247. [6] => 1
  248. [7] => 1
  249. [8] =>
  250. [9] => string
  251. )
  252. Iteration 0
  253. - strcasecmp of '1' and '1' is => int(0)
  254. - strcasecmp of '1' and '0' is => int(%d)
  255. - strcasecmp of '1' and '0' is => int(%d)
  256. - strcasecmp of '1' and '-1' is => int(%d)
  257. - strcasecmp of '1' and '-1' is => int(%d)
  258. - strcasecmp of '1' and '' is => int(%d)
  259. - strcasecmp of '1' and '1' is => int(0)
  260. - strcasecmp of '1' and '1' is => int(0)
  261. - strcasecmp of '1' and '' is => int(%d)
  262. - strcasecmp of '1' and 'string' is => int(-%d)
  263. Iteration 1
  264. - strcasecmp of '0' and '1' is => int(-%d)
  265. - strcasecmp of '0' and '0' is => int(0)
  266. - strcasecmp of '0' and '0' is => int(0)
  267. - strcasecmp of '0' and '-1' is => int(%d)
  268. - strcasecmp of '0' and '-1' is => int(%d)
  269. - strcasecmp of '0' and '' is => int(%d)
  270. - strcasecmp of '0' and '1' is => int(-%d)
  271. - strcasecmp of '0' and '1' is => int(-%d)
  272. - strcasecmp of '0' and '' is => int(%d)
  273. - strcasecmp of '0' and 'string' is => int(-%d)
  274. Iteration 2
  275. - strcasecmp of '0' and '1' is => int(-%d)
  276. - strcasecmp of '0' and '0' is => int(0)
  277. - strcasecmp of '0' and '0' is => int(0)
  278. - strcasecmp of '0' and '-1' is => int(%d)
  279. - strcasecmp of '0' and '-1' is => int(%d)
  280. - strcasecmp of '0' and '' is => int(%d)
  281. - strcasecmp of '0' and '1' is => int(-%d)
  282. - strcasecmp of '0' and '1' is => int(-%d)
  283. - strcasecmp of '0' and '' is => int(%d)
  284. - strcasecmp of '0' and 'string' is => int(-%d)
  285. Iteration 3
  286. - strcasecmp of '-1' and '1' is => int(-%d)
  287. - strcasecmp of '-1' and '0' is => int(-%d)
  288. - strcasecmp of '-1' and '0' is => int(-%d)
  289. - strcasecmp of '-1' and '-1' is => int(0)
  290. - strcasecmp of '-1' and '-1' is => int(0)
  291. - strcasecmp of '-1' and '' is => int(%d)
  292. - strcasecmp of '-1' and '1' is => int(-%d)
  293. - strcasecmp of '-1' and '1' is => int(-%d)
  294. - strcasecmp of '-1' and '' is => int(%d)
  295. - strcasecmp of '-1' and 'string' is => int(-%d)
  296. Iteration 4
  297. - strcasecmp of '-1' and '1' is => int(-%d)
  298. - strcasecmp of '-1' and '0' is => int(-%d)
  299. - strcasecmp of '-1' and '0' is => int(-%d)
  300. - strcasecmp of '-1' and '-1' is => int(0)
  301. - strcasecmp of '-1' and '-1' is => int(0)
  302. - strcasecmp of '-1' and '' is => int(%d)
  303. - strcasecmp of '-1' and '1' is => int(-%d)
  304. - strcasecmp of '-1' and '1' is => int(-%d)
  305. - strcasecmp of '-1' and '' is => int(%d)
  306. - strcasecmp of '-1' and 'string' is => int(-%d)
  307. Iteration 5
  308. - strcasecmp of '' and '1' is => int(-%d)
  309. - strcasecmp of '' and '0' is => int(-%d)
  310. - strcasecmp of '' and '0' is => int(-%d)
  311. - strcasecmp of '' and '-1' is => int(-%d)
  312. - strcasecmp of '' and '-1' is => int(-%d)
  313. - strcasecmp of '' and '' is => int(0)
  314. - strcasecmp of '' and '1' is => int(-%d)
  315. - strcasecmp of '' and '1' is => int(-%d)
  316. - strcasecmp of '' and '' is => int(0)
  317. - strcasecmp of '' and 'string' is => int(-%d)
  318. Iteration 6
  319. - strcasecmp of '1' and '1' is => int(0)
  320. - strcasecmp of '1' and '0' is => int(%d)
  321. - strcasecmp of '1' and '0' is => int(%d)
  322. - strcasecmp of '1' and '-1' is => int(%d)
  323. - strcasecmp of '1' and '-1' is => int(%d)
  324. - strcasecmp of '1' and '' is => int(%d)
  325. - strcasecmp of '1' and '1' is => int(0)
  326. - strcasecmp of '1' and '1' is => int(0)
  327. - strcasecmp of '1' and '' is => int(%d)
  328. - strcasecmp of '1' and 'string' is => int(-%d)
  329. Iteration 7
  330. - strcasecmp of '1' and '1' is => int(0)
  331. - strcasecmp of '1' and '0' is => int(%d)
  332. - strcasecmp of '1' and '0' is => int(%d)
  333. - strcasecmp of '1' and '-1' is => int(%d)
  334. - strcasecmp of '1' and '-1' is => int(%d)
  335. - strcasecmp of '1' and '' is => int(%d)
  336. - strcasecmp of '1' and '1' is => int(0)
  337. - strcasecmp of '1' and '1' is => int(0)
  338. - strcasecmp of '1' and '' is => int(%d)
  339. - strcasecmp of '1' and 'string' is => int(-%d)
  340. Iteration 8
  341. - strcasecmp of '' and '1' is => int(-%d)
  342. - strcasecmp of '' and '0' is => int(-%d)
  343. - strcasecmp of '' and '0' is => int(-%d)
  344. - strcasecmp of '' and '-1' is => int(-%d)
  345. - strcasecmp of '' and '-1' is => int(-%d)
  346. - strcasecmp of '' and '' is => int(0)
  347. - strcasecmp of '' and '1' is => int(-%d)
  348. - strcasecmp of '' and '1' is => int(-%d)
  349. - strcasecmp of '' and '' is => int(0)
  350. - strcasecmp of '' and 'string' is => int(-%d)
  351. Iteration 9
  352. - strcasecmp of 'string' and '1' is => int(%d)
  353. - strcasecmp of 'string' and '0' is => int(%d)
  354. - strcasecmp of 'string' and '0' is => int(%d)
  355. - strcasecmp of 'string' and '-1' is => int(%d)
  356. - strcasecmp of 'string' and '-1' is => int(%d)
  357. - strcasecmp of 'string' and '' is => int(%d)
  358. - strcasecmp of 'string' and '1' is => int(%d)
  359. - strcasecmp of 'string' and '1' is => int(%d)
  360. - strcasecmp of 'string' and '' is => int(%d)
  361. - strcasecmp of 'string' and 'string' is => int(0)
  362. *** comparing the strings in an
  363. Array
  364. (
  365. [0] => 10.5
  366. [1] => 1.5
  367. [2] => 9.5
  368. [3] => 11.5
  369. [4] => 100.5
  370. [5] => 105
  371. [6] => -10.5
  372. [7] => 10
  373. [8] => 0.5
  374. )
  375. Iteration 0
  376. - strcasecmp of '10.5' and '10.5' is => int(0)
  377. - strcasecmp of '10.5' and '1.5' is => int(%d)
  378. - strcasecmp of '10.5' and '9.5' is => int(-%d)
  379. - strcasecmp of '10.5' and '11.5' is => int(-%d)
  380. - strcasecmp of '10.5' and '100.5' is => int(-%d)
  381. - strcasecmp of '10.5' and '105' is => int(-%d)
  382. - strcasecmp of '10.5' and '-10.5' is => int(%d)
  383. - strcasecmp of '10.5' and '10' is => int(%d)
  384. - strcasecmp of '10.5' and '0.5' is => int(%d)
  385. Iteration 1
  386. - strcasecmp of '1.5' and '10.5' is => int(-%d)
  387. - strcasecmp of '1.5' and '1.5' is => int(0)
  388. - strcasecmp of '1.5' and '9.5' is => int(-%d)
  389. - strcasecmp of '1.5' and '11.5' is => int(-%d)
  390. - strcasecmp of '1.5' and '100.5' is => int(-%d)
  391. - strcasecmp of '1.5' and '105' is => int(-%d)
  392. - strcasecmp of '1.5' and '-10.5' is => int(%d)
  393. - strcasecmp of '1.5' and '10' is => int(-%d)
  394. - strcasecmp of '1.5' and '0.5' is => int(%d)
  395. Iteration 2
  396. - strcasecmp of '9.5' and '10.5' is => int(%d)
  397. - strcasecmp of '9.5' and '1.5' is => int(%d)
  398. - strcasecmp of '9.5' and '9.5' is => int(0)
  399. - strcasecmp of '9.5' and '11.5' is => int(%d)
  400. - strcasecmp of '9.5' and '100.5' is => int(%d)
  401. - strcasecmp of '9.5' and '105' is => int(%d)
  402. - strcasecmp of '9.5' and '-10.5' is => int(%d)
  403. - strcasecmp of '9.5' and '10' is => int(%d)
  404. - strcasecmp of '9.5' and '0.5' is => int(%d)
  405. Iteration 3
  406. - strcasecmp of '11.5' and '10.5' is => int(%d)
  407. - strcasecmp of '11.5' and '1.5' is => int(%d)
  408. - strcasecmp of '11.5' and '9.5' is => int(-%d)
  409. - strcasecmp of '11.5' and '11.5' is => int(0)
  410. - strcasecmp of '11.5' and '100.5' is => int(%d)
  411. - strcasecmp of '11.5' and '105' is => int(%d)
  412. - strcasecmp of '11.5' and '-10.5' is => int(%d)
  413. - strcasecmp of '11.5' and '10' is => int(%d)
  414. - strcasecmp of '11.5' and '0.5' is => int(%d)
  415. Iteration 4
  416. - strcasecmp of '100.5' and '10.5' is => int(%d)
  417. - strcasecmp of '100.5' and '1.5' is => int(%d)
  418. - strcasecmp of '100.5' and '9.5' is => int(-%d)
  419. - strcasecmp of '100.5' and '11.5' is => int(-%d)
  420. - strcasecmp of '100.5' and '100.5' is => int(0)
  421. - strcasecmp of '100.5' and '105' is => int(-%d)
  422. - strcasecmp of '100.5' and '-10.5' is => int(%d)
  423. - strcasecmp of '100.5' and '10' is => int(%d)
  424. - strcasecmp of '100.5' and '0.5' is => int(%d)
  425. Iteration 5
  426. - strcasecmp of '105' and '10.5' is => int(%d)
  427. - strcasecmp of '105' and '1.5' is => int(%d)
  428. - strcasecmp of '105' and '9.5' is => int(-%d)
  429. - strcasecmp of '105' and '11.5' is => int(-%d)
  430. - strcasecmp of '105' and '100.5' is => int(%d)
  431. - strcasecmp of '105' and '105' is => int(0)
  432. - strcasecmp of '105' and '-10.5' is => int(%d)
  433. - strcasecmp of '105' and '10' is => int(%d)
  434. - strcasecmp of '105' and '0.5' is => int(%d)
  435. Iteration 6
  436. - strcasecmp of '-10.5' and '10.5' is => int(-%d)
  437. - strcasecmp of '-10.5' and '1.5' is => int(-%d)
  438. - strcasecmp of '-10.5' and '9.5' is => int(-%d)
  439. - strcasecmp of '-10.5' and '11.5' is => int(-%d)
  440. - strcasecmp of '-10.5' and '100.5' is => int(-%d)
  441. - strcasecmp of '-10.5' and '105' is => int(-%d)
  442. - strcasecmp of '-10.5' and '-10.5' is => int(0)
  443. - strcasecmp of '-10.5' and '10' is => int(-%d)
  444. - strcasecmp of '-10.5' and '0.5' is => int(-%d)
  445. Iteration 7
  446. - strcasecmp of '10' and '10.5' is => int(-%d)
  447. - strcasecmp of '10' and '1.5' is => int(%d)
  448. - strcasecmp of '10' and '9.5' is => int(-%d)
  449. - strcasecmp of '10' and '11.5' is => int(-%d)
  450. - strcasecmp of '10' and '100.5' is => int(-%d)
  451. - strcasecmp of '10' and '105' is => int(-%d)
  452. - strcasecmp of '10' and '-10.5' is => int(%d)
  453. - strcasecmp of '10' and '10' is => int(0)
  454. - strcasecmp of '10' and '0.5' is => int(%d)
  455. Iteration 8
  456. - strcasecmp of '0.5' and '10.5' is => int(-%d)
  457. - strcasecmp of '0.5' and '1.5' is => int(-%d)
  458. - strcasecmp of '0.5' and '9.5' is => int(-%d)
  459. - strcasecmp of '0.5' and '11.5' is => int(-%d)
  460. - strcasecmp of '0.5' and '100.5' is => int(-%d)
  461. - strcasecmp of '0.5' and '105' is => int(-%d)
  462. - strcasecmp of '0.5' and '-10.5' is => int(%d)
  463. - strcasecmp of '0.5' and '10' is => int(-%d)
  464. - strcasecmp of '0.5' and '0.5' is => int(0)
  465. #### Testing miscellaneous inputs ####
  466. --- Testing objects ---
  467. int(-%d)
  468. --- Testing arrays ---
  469. int(%d)
  470. int(%d)
  471. --- Testing a longer and heredoc string ---
  472. int(0)
  473. int(-%d)
  474. int(%d)
  475. --- Testing a heredoc null string ---
  476. int(-%d)
  477. int(-%d)
  478. --- Testing simple and complex syntax strings ---
  479. int(-%d)
  480. int(-%d)
  481. Warning: Undefined variable $strS in %s on line %d
  482. int(%d)
  483. int(-%d)
  484. int(-%d)
  485. --- Testing binary safe and binary chars ---
  486. int(%d)
  487. int(-%d)
  488. int(0)
  489. int(0)
  490. int(%d)
  491. --- Comparing long float values ---
  492. int(0)
  493. int(-%d)
  494. int(0)
  495. Done