1--TEST-- 2strcmp() function 3--INI-- 4precision = 12 5--FILE-- 6<?php 7/* Compares two strings in case-sensitive manner */ 8 9echo "#### Basic and Possible operations ####"; 10/* creating an array of strings to be compared */ 11$arrays = array( 12 array("a", "A", '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, "", 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 "- strcmp of '$str1_arr[$i]' and '$str1_arr[$j]' is => "; 27 var_dump(strcmp($str1_arr[$i], $str1_arr[$j])); 28 } 29 } 30} 31 32 33 34echo "\n#### Testing miscellaneous 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(strcmp("$obj_string1", "$obj_string2")); 56 57 58echo "\n--- Testing arrays ---\n"; 59$str_arr = array("hello", "?world", "!$%**()%**[][[[&@#~!"); 60var_dump(strcmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[1]")); 61var_dump(strcmp("hello?world,!$%**()%**[][[[&@#~!", "$str_arr[2]")); 62 63 64echo "\n--- Testing a longer and heredoc string ---\n"; 65$string = <<<EOD 66abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 67abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 68abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 69abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 70abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 71abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 72abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 73@#$%^&**&^%$#@!~:())))((((&&&**%$###@@@!!!~~~~@###$%^&* 74abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789 75EOD; 76var_dump(strcmp($string, $string)); 77var_dump(strcmp($string, "xyz0123456789")); 78var_dump(strcmp($string, "&&&")); 79 80echo "\n--- Testing a heredoc null string ---\n"; 81$str = <<<EOD 82EOD; 83var_dump(strcmp($str, "\0")); 84var_dump(strcmp($str, NULL)); 85var_dump(strcmp($str, "0")); 86 87 88echo "\n--- Testing simple and complex syntax strings ---\n"; 89$str = 'world'; 90 91/* Simple syntax */ 92var_dump(strcmp("Hello, world", "$str")); 93var_dump(strcmp("Hello, world'S", "$str'S")); 94var_dump(strcmp("Hello, worldS", "$strS")); 95 96/* String with curly braces, complex syntax */ 97var_dump(strcmp("Hello, worldS", "${str}S")); 98var_dump(strcmp("Hello, worldS", "{$str}S")); 99 100echo "\n--- Testing binary safe and binary chars ---\n"; 101var_dump(strcmp("Hello\0world", "Hello")); 102var_dump(strcmp("Hello\0world", "Helloworld")); 103var_dump(strcmp("\x0", "\0")); 104var_dump(strcmp("\000", "\0")); 105var_dump(strcmp("\x00", "")); 106var_dump(strcmp("\x00", NULL)); 107var_dump(strcmp("\000", NULL)); 108 109echo "\n--- Comparing long float values ---\n"; 110/* Here two different outputs, which depends on the rounding value 111 before converting to string. Here Precision = 12 */ 112var_dump(strcmp(10.55555555555555555555555555, 10.5555555556)); // int(0) 113var_dump(strcmp(10.55555555555555555555555555, 10.555555556)); // int(-1) 114var_dump(strcmp(10.55555555595555555555555555, 10.555555556)); // int(0) 115 116echo "Done\n"; 117?> 118--EXPECTF-- 119#### Basic and Possible operations #### 120*** comparing the strings in an 121Array 122( 123 [0] => a 124 [1] => A 125 [2] => a 126 [3] => A 127 [4] => � 128 [5] => � 129 [6] => 130) 131 132Iteration 0 133- strcmp of 'a' and 'a' is => int(0) 134- strcmp of 'a' and 'A' is => int(%d) 135- strcmp of 'a' and 'a' is => int(0) 136- strcmp of 'a' and 'A' is => int(%d) 137- strcmp of 'a' and '�' is => int(-%d) 138- strcmp of 'a' and '�' is => int(-%d) 139- strcmp of 'a' and '' is => int(%d) 140 141Iteration 1 142- strcmp of 'A' and 'a' is => int(-%d) 143- strcmp of 'A' and 'A' is => int(0) 144- strcmp of 'A' and 'a' is => int(-%d) 145- strcmp of 'A' and 'A' is => int(0) 146- strcmp of 'A' and '�' is => int(-%d) 147- strcmp of 'A' and '�' is => int(-%d) 148- strcmp of 'A' and '' is => int(%d) 149 150Iteration 2 151- strcmp of 'a' and 'a' is => int(0) 152- strcmp of 'a' and 'A' is => int(%d) 153- strcmp of 'a' and 'a' is => int(0) 154- strcmp of 'a' and 'A' is => int(%d) 155- strcmp of 'a' and '�' is => int(-%d) 156- strcmp of 'a' and '�' is => int(-%d) 157- strcmp of 'a' and '' is => int(%d) 158 159Iteration 3 160- strcmp of 'A' and 'a' is => int(-%d) 161- strcmp of 'A' and 'A' is => int(0) 162- strcmp of 'A' and 'a' is => int(-%d) 163- strcmp of 'A' and 'A' is => int(0) 164- strcmp of 'A' and '�' is => int(-%d) 165- strcmp of 'A' and '�' is => int(-%d) 166- strcmp of 'A' and '' is => int(%d) 167 168Iteration 4 169- strcmp of '�' and 'a' is => int(%d) 170- strcmp of '�' and 'A' is => int(%d) 171- strcmp of '�' and 'a' is => int(%d) 172- strcmp of '�' and 'A' is => int(%d) 173- strcmp of '�' and '�' is => int(0) 174- strcmp of '�' and '�' is => int(-%d) 175- strcmp of '�' and '' is => int(%d) 176 177Iteration 5 178- strcmp of '�' and 'a' is => int(%d) 179- strcmp of '�' and 'A' is => int(%d) 180- strcmp of '�' and 'a' is => int(%d) 181- strcmp of '�' and 'A' is => int(%d) 182- strcmp of '�' and '�' is => int(%d) 183- strcmp of '�' and '�' is => int(0) 184- strcmp of '�' and '' is => int(%d) 185 186Iteration 6 187- strcmp of '' and 'a' is => int(-%d) 188- strcmp of '' and 'A' is => int(-%d) 189- strcmp of '' and 'a' is => int(-%d) 190- strcmp of '' and 'A' is => int(-%d) 191- strcmp of '' and '�' is => int(-%d) 192- strcmp of '' and '�' is => int(-%d) 193- strcmp of '' and '' is => int(0) 194 195*** comparing the strings in an 196Array 197( 198 [0] => acc 199 [1] => Acc 200 [2] => ac 201 [3] => accc 202 [4] => acd 203 [5] => ?acc 204 [6] => acc! 205 [7] => $!acc 206 [8] => ;acc 207) 208 209Iteration 0 210- strcmp of 'acc' and 'acc' is => int(0) 211- strcmp of 'acc' and 'Acc' is => int(%d) 212- strcmp of 'acc' and 'ac' is => int(%d) 213- strcmp of 'acc' and 'accc' is => int(-%d) 214- strcmp of 'acc' and 'acd' is => int(-%d) 215- strcmp of 'acc' and '?acc' is => int(%d) 216- strcmp of 'acc' and 'acc!' is => int(-%d) 217- strcmp of 'acc' and '$!acc' is => int(%d) 218- strcmp of 'acc' and ';acc' is => int(%d) 219 220Iteration 1 221- strcmp of 'Acc' and 'acc' is => int(-%d) 222- strcmp of 'Acc' and 'Acc' is => int(0) 223- strcmp of 'Acc' and 'ac' is => int(-%d) 224- strcmp of 'Acc' and 'accc' is => int(-%d) 225- strcmp of 'Acc' and 'acd' is => int(-%d) 226- strcmp of 'Acc' and '?acc' is => int(%d) 227- strcmp of 'Acc' and 'acc!' is => int(-%d) 228- strcmp of 'Acc' and '$!acc' is => int(%d) 229- strcmp of 'Acc' and ';acc' is => int(%d) 230 231Iteration 2 232- strcmp of 'ac' and 'acc' is => int(-%d) 233- strcmp of 'ac' and 'Acc' is => int(%d) 234- strcmp of 'ac' and 'ac' is => int(0) 235- strcmp of 'ac' and 'accc' is => int(-%d) 236- strcmp of 'ac' and 'acd' is => int(-%d) 237- strcmp of 'ac' and '?acc' is => int(%d) 238- strcmp of 'ac' and 'acc!' is => int(-%d) 239- strcmp of 'ac' and '$!acc' is => int(%d) 240- strcmp of 'ac' and ';acc' is => int(%d) 241 242Iteration 3 243- strcmp of 'accc' and 'acc' is => int(%d) 244- strcmp of 'accc' and 'Acc' is => int(%d) 245- strcmp of 'accc' and 'ac' is => int(%d) 246- strcmp of 'accc' and 'accc' is => int(0) 247- strcmp of 'accc' and 'acd' is => int(-%d) 248- strcmp of 'accc' and '?acc' is => int(%d) 249- strcmp of 'accc' and 'acc!' is => int(%d) 250- strcmp of 'accc' and '$!acc' is => int(%d) 251- strcmp of 'accc' and ';acc' is => int(%d) 252 253Iteration 4 254- strcmp of 'acd' and 'acc' is => int(%d) 255- strcmp of 'acd' and 'Acc' is => int(%d) 256- strcmp of 'acd' and 'ac' is => int(%d) 257- strcmp of 'acd' and 'accc' is => int(%d) 258- strcmp of 'acd' and 'acd' is => int(0) 259- strcmp of 'acd' and '?acc' is => int(%d) 260- strcmp of 'acd' and 'acc!' is => int(%d) 261- strcmp of 'acd' and '$!acc' is => int(%d) 262- strcmp of 'acd' and ';acc' is => int(%d) 263 264Iteration 5 265- strcmp of '?acc' and 'acc' is => int(-%d) 266- strcmp of '?acc' and 'Acc' is => int(-%d) 267- strcmp of '?acc' and 'ac' is => int(-%d) 268- strcmp of '?acc' and 'accc' is => int(-%d) 269- strcmp of '?acc' and 'acd' is => int(-%d) 270- strcmp of '?acc' and '?acc' is => int(0) 271- strcmp of '?acc' and 'acc!' is => int(-%d) 272- strcmp of '?acc' and '$!acc' is => int(%d) 273- strcmp of '?acc' and ';acc' is => int(%d) 274 275Iteration 6 276- strcmp of 'acc!' and 'acc' is => int(%d) 277- strcmp of 'acc!' and 'Acc' is => int(%d) 278- strcmp of 'acc!' and 'ac' is => int(%d) 279- strcmp of 'acc!' and 'accc' is => int(-%d) 280- strcmp of 'acc!' and 'acd' is => int(-%d) 281- strcmp of 'acc!' and '?acc' is => int(%d) 282- strcmp of 'acc!' and 'acc!' is => int(0) 283- strcmp of 'acc!' and '$!acc' is => int(%d) 284- strcmp of 'acc!' and ';acc' is => int(%d) 285 286Iteration 7 287- strcmp of '$!acc' and 'acc' is => int(-%d) 288- strcmp of '$!acc' and 'Acc' is => int(-%d) 289- strcmp of '$!acc' and 'ac' is => int(-%d) 290- strcmp of '$!acc' and 'accc' is => int(-%d) 291- strcmp of '$!acc' and 'acd' is => int(-%d) 292- strcmp of '$!acc' and '?acc' is => int(-%d) 293- strcmp of '$!acc' and 'acc!' is => int(-%d) 294- strcmp of '$!acc' and '$!acc' is => int(0) 295- strcmp of '$!acc' and ';acc' is => int(-%d) 296 297Iteration 8 298- strcmp of ';acc' and 'acc' is => int(-%d) 299- strcmp of ';acc' and 'Acc' is => int(-%d) 300- strcmp of ';acc' and 'ac' is => int(-%d) 301- strcmp of ';acc' and 'accc' is => int(-%d) 302- strcmp of ';acc' and 'acd' is => int(-%d) 303- strcmp of ';acc' and '?acc' is => int(-%d) 304- strcmp of ';acc' and 'acc!' is => int(-%d) 305- strcmp of ';acc' and '$!acc' is => int(%d) 306- strcmp of ';acc' and ';acc' is => int(0) 307 308*** comparing the strings in an 309Array 310( 311 [0] => 1 312 [1] => 0 313 [2] => 0 314 [3] => -1 315 [4] => -1 316 [5] => 317 [6] => 318 [7] => 1 319 [8] => 320 [9] => string 321) 322 323Iteration 0 324- strcmp of '1' and '1' is => int(0) 325- strcmp of '1' and '0' is => int(%d) 326- strcmp of '1' and '0' is => int(%d) 327- strcmp of '1' and '-1' is => int(%d) 328- strcmp of '1' and '-1' is => int(%d) 329- strcmp of '1' and '' is => int(%d) 330- strcmp of '1' and '' is => int(%d) 331- strcmp of '1' and '1' is => int(0) 332- strcmp of '1' and '' is => int(%d) 333- strcmp of '1' and 'string' is => int(-%d) 334 335Iteration 1 336- strcmp of '0' and '1' is => int(-%d) 337- strcmp of '0' and '0' is => int(0) 338- strcmp of '0' and '0' is => int(0) 339- strcmp of '0' and '-1' is => int(%d) 340- strcmp of '0' and '-1' is => int(%d) 341- strcmp of '0' and '' is => int(%d) 342- strcmp of '0' and '' is => int(%d) 343- strcmp of '0' and '1' is => int(-%d) 344- strcmp of '0' and '' is => int(%d) 345- strcmp of '0' and 'string' is => int(-%d) 346 347Iteration 2 348- strcmp of '0' and '1' is => int(-%d) 349- strcmp of '0' and '0' is => int(0) 350- strcmp of '0' and '0' is => int(0) 351- strcmp of '0' and '-1' is => int(%d) 352- strcmp of '0' and '-1' is => int(%d) 353- strcmp of '0' and '' is => int(%d) 354- strcmp of '0' and '' is => int(%d) 355- strcmp of '0' and '1' is => int(-%d) 356- strcmp of '0' and '' is => int(%d) 357- strcmp of '0' and 'string' is => int(-%d) 358 359Iteration 3 360- strcmp of '-1' and '1' is => int(-%d) 361- strcmp of '-1' and '0' is => int(-%d) 362- strcmp of '-1' and '0' is => int(-%d) 363- strcmp of '-1' and '-1' is => int(0) 364- strcmp of '-1' and '-1' is => int(0) 365- strcmp of '-1' and '' is => int(%d) 366- strcmp of '-1' and '' is => int(%d) 367- strcmp of '-1' and '1' is => int(-%d) 368- strcmp of '-1' and '' is => int(%d) 369- strcmp of '-1' and 'string' is => int(-%d) 370 371Iteration 4 372- strcmp of '-1' and '1' is => int(-%d) 373- strcmp of '-1' and '0' is => int(-%d) 374- strcmp of '-1' and '0' is => int(-%d) 375- strcmp of '-1' and '-1' is => int(0) 376- strcmp of '-1' and '-1' is => int(0) 377- strcmp of '-1' and '' is => int(%d) 378- strcmp of '-1' and '' is => int(%d) 379- strcmp of '-1' and '1' is => int(-%d) 380- strcmp of '-1' and '' is => int(%d) 381- strcmp of '-1' and 'string' is => int(-%d) 382 383Iteration 5 384- strcmp of '' and '1' is => int(-%d) 385- strcmp of '' and '0' is => int(-%d) 386- strcmp of '' and '0' is => int(-%d) 387- strcmp of '' and '-1' is => int(-%d) 388- strcmp of '' and '-1' is => int(-%d) 389- strcmp of '' and '' is => int(0) 390- strcmp of '' and '' is => int(0) 391- strcmp of '' and '1' is => int(-%d) 392- strcmp of '' and '' is => int(0) 393- strcmp of '' and 'string' is => int(-%d) 394 395Iteration 6 396- strcmp of '' and '1' is => int(-%d) 397- strcmp of '' and '0' is => int(-%d) 398- strcmp of '' and '0' is => int(-%d) 399- strcmp of '' and '-1' is => int(-%d) 400- strcmp of '' and '-1' is => int(-%d) 401- strcmp of '' and '' is => int(0) 402- strcmp of '' and '' is => int(0) 403- strcmp of '' and '1' is => int(-%d) 404- strcmp of '' and '' is => int(0) 405- strcmp of '' and 'string' is => int(-%d) 406 407Iteration 7 408- strcmp of '1' and '1' is => int(0) 409- strcmp of '1' and '0' is => int(%d) 410- strcmp of '1' and '0' is => int(%d) 411- strcmp of '1' and '-1' is => int(%d) 412- strcmp of '1' and '-1' is => int(%d) 413- strcmp of '1' and '' is => int(%d) 414- strcmp of '1' and '' is => int(%d) 415- strcmp of '1' and '1' is => int(0) 416- strcmp of '1' and '' is => int(%d) 417- strcmp of '1' and 'string' is => int(-%d) 418 419Iteration 8 420- strcmp of '' and '1' is => int(-%d) 421- strcmp of '' and '0' is => int(-%d) 422- strcmp of '' and '0' is => int(-%d) 423- strcmp of '' and '-1' is => int(-%d) 424- strcmp of '' and '-1' is => int(-%d) 425- strcmp of '' and '' is => int(0) 426- strcmp of '' and '' is => int(0) 427- strcmp of '' and '1' is => int(-%d) 428- strcmp of '' and '' is => int(0) 429- strcmp of '' and 'string' is => int(-%d) 430 431Iteration 9 432- strcmp of 'string' and '1' is => int(%d) 433- strcmp of 'string' and '0' is => int(%d) 434- strcmp of 'string' and '0' is => int(%d) 435- strcmp of 'string' and '-1' is => int(%d) 436- strcmp of 'string' and '-1' is => int(%d) 437- strcmp of 'string' and '' is => int(%d) 438- strcmp of 'string' and '' is => int(%d) 439- strcmp of 'string' and '1' is => int(%d) 440- strcmp of 'string' and '' is => int(%d) 441- strcmp of 'string' and 'string' is => int(0) 442 443*** comparing the strings in an 444Array 445( 446 [0] => 10.5 447 [1] => 1.5 448 [2] => 9.5 449 [3] => 11.5 450 [4] => 100.5 451 [5] => 105 452 [6] => -10.5 453 [7] => 10 454 [8] => 0.5 455) 456 457Iteration 0 458- strcmp of '10.5' and '10.5' is => int(0) 459- strcmp of '10.5' and '1.5' is => int(%d) 460- strcmp of '10.5' and '9.5' is => int(-%d) 461- strcmp of '10.5' and '11.5' is => int(-%d) 462- strcmp of '10.5' and '100.5' is => int(-%d) 463- strcmp of '10.5' and '105' is => int(-%d) 464- strcmp of '10.5' and '-10.5' is => int(%d) 465- strcmp of '10.5' and '10' is => int(%d) 466- strcmp of '10.5' and '0.5' is => int(%d) 467 468Iteration 1 469- strcmp of '1.5' and '10.5' is => int(-%d) 470- strcmp of '1.5' and '1.5' is => int(0) 471- strcmp of '1.5' and '9.5' is => int(-%d) 472- strcmp of '1.5' and '11.5' is => int(-%d) 473- strcmp of '1.5' and '100.5' is => int(-%d) 474- strcmp of '1.5' and '105' is => int(-%d) 475- strcmp of '1.5' and '-10.5' is => int(%d) 476- strcmp of '1.5' and '10' is => int(-%d) 477- strcmp of '1.5' and '0.5' is => int(%d) 478 479Iteration 2 480- strcmp of '9.5' and '10.5' is => int(%d) 481- strcmp of '9.5' and '1.5' is => int(%d) 482- strcmp of '9.5' and '9.5' is => int(0) 483- strcmp of '9.5' and '11.5' is => int(%d) 484- strcmp of '9.5' and '100.5' is => int(%d) 485- strcmp of '9.5' and '105' is => int(%d) 486- strcmp of '9.5' and '-10.5' is => int(%d) 487- strcmp of '9.5' and '10' is => int(%d) 488- strcmp of '9.5' and '0.5' is => int(%d) 489 490Iteration 3 491- strcmp of '11.5' and '10.5' is => int(%d) 492- strcmp of '11.5' and '1.5' is => int(%d) 493- strcmp of '11.5' and '9.5' is => int(-%d) 494- strcmp of '11.5' and '11.5' is => int(0) 495- strcmp of '11.5' and '100.5' is => int(%d) 496- strcmp of '11.5' and '105' is => int(%d) 497- strcmp of '11.5' and '-10.5' is => int(%d) 498- strcmp of '11.5' and '10' is => int(%d) 499- strcmp of '11.5' and '0.5' is => int(%d) 500 501Iteration 4 502- strcmp of '100.5' and '10.5' is => int(%d) 503- strcmp of '100.5' and '1.5' is => int(%d) 504- strcmp of '100.5' and '9.5' is => int(-%d) 505- strcmp of '100.5' and '11.5' is => int(-%d) 506- strcmp of '100.5' and '100.5' is => int(0) 507- strcmp of '100.5' and '105' is => int(-%d) 508- strcmp of '100.5' and '-10.5' is => int(%d) 509- strcmp of '100.5' and '10' is => int(%d) 510- strcmp of '100.5' and '0.5' is => int(%d) 511 512Iteration 5 513- strcmp of '105' and '10.5' is => int(%d) 514- strcmp of '105' and '1.5' is => int(%d) 515- strcmp of '105' and '9.5' is => int(-%d) 516- strcmp of '105' and '11.5' is => int(-%d) 517- strcmp of '105' and '100.5' is => int(%d) 518- strcmp of '105' and '105' is => int(0) 519- strcmp of '105' and '-10.5' is => int(%d) 520- strcmp of '105' and '10' is => int(%d) 521- strcmp of '105' and '0.5' is => int(%d) 522 523Iteration 6 524- strcmp of '-10.5' and '10.5' is => int(-%d) 525- strcmp of '-10.5' and '1.5' is => int(-%d) 526- strcmp of '-10.5' and '9.5' is => int(-%d) 527- strcmp of '-10.5' and '11.5' is => int(-%d) 528- strcmp of '-10.5' and '100.5' is => int(-%d) 529- strcmp of '-10.5' and '105' is => int(-%d) 530- strcmp of '-10.5' and '-10.5' is => int(0) 531- strcmp of '-10.5' and '10' is => int(-%d) 532- strcmp of '-10.5' and '0.5' is => int(-%d) 533 534Iteration 7 535- strcmp of '10' and '10.5' is => int(-%d) 536- strcmp of '10' and '1.5' is => int(%d) 537- strcmp of '10' and '9.5' is => int(-%d) 538- strcmp of '10' and '11.5' is => int(-%d) 539- strcmp of '10' and '100.5' is => int(-%d) 540- strcmp of '10' and '105' is => int(-%d) 541- strcmp of '10' and '-10.5' is => int(%d) 542- strcmp of '10' and '10' is => int(0) 543- strcmp of '10' and '0.5' is => int(%d) 544 545Iteration 8 546- strcmp of '0.5' and '10.5' is => int(-%d) 547- strcmp of '0.5' and '1.5' is => int(-%d) 548- strcmp of '0.5' and '9.5' is => int(-%d) 549- strcmp of '0.5' and '11.5' is => int(-%d) 550- strcmp of '0.5' and '100.5' is => int(-%d) 551- strcmp of '0.5' and '105' is => int(-%d) 552- strcmp of '0.5' and '-10.5' is => int(%d) 553- strcmp of '0.5' and '10' is => int(-%d) 554- strcmp of '0.5' and '0.5' is => int(0) 555 556#### Testing miscellaneous inputs #### 557--- Testing objects --- 558int(-%d) 559 560--- Testing arrays --- 561int(%d) 562int(%d) 563 564--- Testing a longer and heredoc string --- 565int(0) 566int(-%d) 567int(%d) 568 569--- Testing a heredoc null string --- 570int(-%d) 571int(0) 572int(-%d) 573 574--- Testing simple and complex syntax strings --- 575int(-%d) 576int(-%d) 577 578Warning: Undefined variable $strS in %s on line %d 579int(%d) 580int(-%d) 581int(-%d) 582 583--- Testing binary safe and binary chars --- 584int(%d) 585int(-%d) 586int(0) 587int(0) 588int(%d) 589int(%d) 590int(%d) 591 592--- Comparing long float values --- 593int(0) 594int(-%d) 595int(0) 596Done 597