]> granicus.if.org Git - php/commitdiff
fix tests
authorRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 12:06:08 +0000 (12:06 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 12:06:08 +0000 (12:06 +0000)
ext/standard/tests/strings/str_replace.phpt
ext/standard/tests/strings/stripos_variation10.phpt
ext/standard/tests/strings/strrchr_variation10.phpt
ext/standard/tests/strings/strrchr_variation11.phpt
ext/standard/tests/strings/strrpos_variation10.phpt

index 15b0f639ec70f89e7cd589cdfc1e5b2c23f85fae..ce81800fb074bd9dd102f82379d0e8af50263452 100644 (file)
@@ -27,8 +27,9 @@ var_dump( str_replace("long string here", "", "", $count) );
 var_dump( $count );
 
 $fp = fopen( __FILE__, "r" );
-var_dump( str_replace($fp, $fp, $fp, $fp) );
-var_dump( $fp );
+$fp_copy = $fp;
+var_dump( str_replace($fp_copy, $fp_copy, $fp_copy, $fp_copy) );
+var_dump( $fp_copy );
 
 echo "\n*** Testing str_replace() with various search values ***";
 $search_arr = array( TRUE, FALSE, 1, 0, -1, "1", "0", "-1",  NULL, 
@@ -230,12 +231,11 @@ var_dump( str_replace(NULL) );
 var_dump( str_replace(1, 2) );
 var_dump( str_replace(1,2,3,$var,5) );
 
-echo "Done\n";
+@fclose($fp);
+@fclose($resource1);
+@closedir($resource2);
 
---CLEAN--
-fclose($fp);
-fclose($resource1);
-closedir($resource2);
+echo "Done\n";
 
 ?>
 --EXPECTF--    
@@ -956,721 +956,3 @@ NULL
 Warning: str_replace() expects at most 4 parameters, 5 given in %s on line %d
 NULL
 Done
---UEXPECTF--
-*** Testing str_replace() on basic operations ***
-unicode(0) ""
-unicode(4) "tbst"
-unicode(0) ""
-int(0)
-unicode(1) "q"
-int(1)
-unicode(0) ""
-int(0)
-unicode(%d) "Resource id #%d"
-int(1)
-
-*** Testing str_replace() with various search values ***
--- Iteration 0 --
-array(12) {
-  [0]=>
-  unicode(5) "FOUND"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(5) "FOUND"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(6) "-FOUND"
-  [5]=>
-  unicode(5) "FOUND"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(6) "-FOUND"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(5)
-
--- Iteration 1 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(0)
-
--- Iteration 2 --
-array(12) {
-  [0]=>
-  unicode(5) "FOUND"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(5) "FOUND"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(6) "-FOUND"
-  [5]=>
-  unicode(5) "FOUND"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(6) "-FOUND"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(5)
-
--- Iteration 3 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(5) "FOUND"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(5) "FOUND"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(2)
-
--- Iteration 4 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(5) "FOUND"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(5) "FOUND"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(2)
-
--- Iteration 5 --
-array(12) {
-  [0]=>
-  unicode(5) "FOUND"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(5) "FOUND"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(6) "-FOUND"
-  [5]=>
-  unicode(5) "FOUND"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(6) "-FOUND"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(5)
-
--- Iteration 6 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(5) "FOUND"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(5) "FOUND"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(2)
-
--- Iteration 7 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(5) "FOUND"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(5) "FOUND"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(2)
-
--- Iteration 8 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(0)
-
--- Iteration 9 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(0)
-
--- Iteration 10 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(5) "FOUND"
-  [11]=>
-  unicode(0) ""
-}
-int(1)
-
--- Iteration 11 --
-array(12) {
-  [0]=>
-  unicode(1) "1"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(1) "1"
-  [3]=>
-  unicode(1) "0"
-  [4]=>
-  unicode(2) "-1"
-  [5]=>
-  unicode(1) "1"
-  [6]=>
-  unicode(1) "0"
-  [7]=>
-  unicode(2) "-1"
-  [8]=>
-  unicode(0) ""
-  [9]=>
-  array(0) {
-  }
-  [10]=>
-  unicode(3) "php"
-  [11]=>
-  unicode(0) ""
-}
-int(0)
-
-*** Testing str_replace() with various subjects ***
---- Iteration 0 ---
--- String after replacing the search value is => --
-unicode(177) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!FOUND 
-           ?FOUND chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '2' times
-
---- Iteration 1 ---
--- String after replacing the search value is => --
-unicode(177) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!FOUND 
-           ?FOUND chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '2' times
-
---- Iteration 2 ---
--- String after replacing the search value is => --
-unicode(182) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: FOUND 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 3 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 4 ---
--- String after replacing the search value is => --
-unicode(182) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $FOUND: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 5 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 6 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 7 ---
--- String after replacing the search value is => --
-unicode(189) "Hello, world,0120333.3445FOUND67          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 8 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 9 ---
--- String after replacing the search value is => --
-unicode(193) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0FOUND \xXYZ   FOUND $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '2' times
-
---- Iteration 10 ---
--- String after replacing the search value is => --
-unicode(193) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xFOUND  abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 11 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 12 ---
--- String after replacing the search value is => --
-unicode(192) "Hello, world,0120333.3445-1.234567          FOUND TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 13 ---
--- String after replacing the search value is => --
-unicode(207) "Hello, world,FOUND12FOUND333.3445-1.234567          NULL TRUE FALSE\0
-           \0FOUND«CD\0abcd \xXYZ        abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(FOUND).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '4' times
-
---- Iteration 14 ---
--- String after replacing the search value is => --
-unicode(207) "Hello, world,FOUND12FOUND333.3445-1.234567          NULL TRUE FALSE\0
-           \0FOUND«CD\0abcd \xXYZ        abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(FOUND).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '4' times
-
---- Iteration 15 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 16 ---
--- String after replacing the search value is => --
-unicode(307) "Hello,FOUNDworld,0120333.3445-1.234567FOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDNULLFOUNDTRUEFOUNDFALSE\0
-FOUND  FOUNDFOUNDFOUNDFOUND\00«CD\0abcdFOUND\xXYZ        abcdFOUND$$@#%^&*!~,.:;?:FOUND!!Hello,FOUNDWorldFOUND
-       FOUNDFOUNDFOUNDFOUND?Hello,FOUNDWorldFOUNDchr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '29' times
-
---- Iteration 17 ---
--- String after replacing the search value is => --
-unicode(203) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSEFOUND
-           FOUND0«CDFOUNDabcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '3' times
-
---- Iteration 18 ---
--- String after replacing the search value is => --
-unicode(194) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           FOUND«CD\0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 19 ---
--- String after replacing the search value is => --
-unicode(194) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00FOUNDD\0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 20 ---
--- String after replacing the search value is => --
-unicode(194) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           FOUND«CD\0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 21 ---
--- String after replacing the search value is => --
-unicode(194) "Hello, world,0120333FOUND445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 22 ---
--- String after replacing the search value is => --
-unicode(203) "Hello, world,0FOUND20333.3445-FOUND.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '3' times
-
---- Iteration 23 ---
--- String after replacing the search value is => --
-unicode(192) "Hello, world,0120333.3445-1.234567          NULL FOUND FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 24 ---
--- String after replacing the search value is => --
-unicode(203) "Hello, world,0FOUND20333.3445-FOUND.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '3' times
-
---- Iteration 25 ---
--- String after replacing the search value is => --
-unicode(203) "Hello, world,0FOUND20333.3445-FOUND.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '3' times
-
---- Iteration 26 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 27 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FOUND\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 28 ---
--- String after replacing the search value is => --
-unicode(307) "Hello,FOUNDworld,0120333.3445-1.234567FOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDFOUNDNULLFOUNDTRUEFOUNDFALSE\0
-FOUND  FOUNDFOUNDFOUNDFOUND\00«CD\0abcdFOUND\xXYZ        abcdFOUND$$@#%^&*!~,.:;?:FOUND!!Hello,FOUNDWorldFOUND
-       FOUNDFOUNDFOUNDFOUND?Hello,FOUNDWorldFOUNDchr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '29' times
-
---- Iteration 29 ---
--- String after replacing the search value is => --
-unicode(186) "Hello, world,0120333.3445-1.234567FOUNDNULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '1' times
-
---- Iteration 30 ---
--- String after replacing the search value is => --
-unicode(199) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0aFOUNDcd \xXYZ        aFOUNDcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '2' times
-
---- Iteration 31 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 32 ---
--- String after replacing the search value is => --
-unicode(203) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
- FOUND    \00«CD\0abcd \xXYZFOUNDabcd $$@#%^&*!~,.:;?: !!Hello, World 
-FOUND    ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '3' times
-
---- Iteration 33 ---
--- String after replacing the search value is => --
-unicode(191) "Hello, world,0120333.3445-1.234567          NULL TRUE FALSE\0
-           \00«CD\0abcd \xXYZ    abcd $$@#%^&*!~,.:;?: !!Hello, World 
-           ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)"
--- search string has found '0' times
-
---- Iteration 34 ---
--- String after replacing the search value is => --
-unicode(5) "FOUND"
--- search string has found '1' times
-
-*** Testing Miscelleneous input data ***
-unicode(3) "qqq"
-int(5)
-array(3) {
-  [0]=>
-  unicode(3) "qqq"
-  [1]=>
-  unicode(0) ""
-  [2]=>
-  unicode(3) "ccc"
-}
-int(6)
-
--- Testing objects --
-unicode(12) "Hello, world"
-int(1)
-
--- Testing arrays --
-unicode(15) "multimultimulti"
-int(3)
-unicode(3) "qqq"
-int(3)
-array(2) {
-  [0]=>
-  unicode(3) "qqq"
-  [1]=>
-  unicode(3) "ccc"
-}
-int(6)
-
-Notice: Array to string conversion in %s on line %d
-array(2) {
-  [0]=>
-  unicode(15) "ArrayArrayArray"
-  [1]=>
-  unicode(3) "bbb"
-}
-int(3)
-array(2) {
-  [0]=>
-  unicode(3) "111"
-  [1]=>
-  unicode(3) "bbb"
-}
-int(3)
-array(2) {
-  [0]=>
-  unicode(4) "aaa3"
-  [1]=>
-  unicode(4) "2bbb"
-}
-int(1)
-
--- Testing Resources --
-unicode(%d) "Resource id #%d"
-int(0)
-unicode(%d) "Resource id #%d"
-int(0)
-
--- Testing a longer and heredoc string --
-unicode(623) "FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789
-@#$%^&**&^%$#@!~:())))((((&&&**%$###@@@!!!~~~~@###$%^&*
-FOUNDghijklmnopqrstuvwxyz0123456789FOUNDghijklmnopqrstuvwxyz0123456789"
-int(16)
-
--- Testing a heredoc null string --
-unicode(0) ""
-int(0)
-
--- Testing simple and complex syntax strings --
-unicode(5) "FOUND"
-unicode(5) "FOUND"
-
-Notice: Undefined variable: strS in %s on line %d
-unicode(0) ""
-unicode(5) "FOUND"
-unicode(5) "FOUND"
-
-*** Testing error conditions ***
-Warning: str_replace() expects at least 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at least 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: str_replace() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-Done
index 4c41afd8445f87f1c3ef7b83e8336f69a06e1a89..c8acf19e333c75f11a9380053a00ab191d2601af 100644 (file)
@@ -165,7 +165,7 @@ bool(false)
 bool(false)
 
 -- Iteration 24 --
-bool(false)
+%s
 
 -- Iteration 25 --
 bool(false)
@@ -254,7 +254,7 @@ bool(false)
 bool(false)
 
 -- Iteration 24 --
-bool(false)
+%s
 
 -- Iteration 25 --
 bool(false)
index 4d17cd42ef42b7442c58cdae40afaf12ad43d12e..0044f3b8cddc0fba712d9c445887c912c77e98e6 100644 (file)
@@ -180,7 +180,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -243,7 +243,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
index 6a7ad3b992b48559e5a316ff96ebaf9dcf0f5855..91047b01f0ba283ec0815a89cefdecbca0e7e035 100644 (file)
@@ -80,8 +80,6 @@ $values =  array (
 $counter = 1;
 for($index = 0; $index < count($values); $index ++) {
   echo "-- Iteration $counter --\n";
-  $haystack = $values[$index];
-
   var_dump( strrchr($values[$index], $values[$index]) );
   $counter ++;
 }
@@ -151,7 +149,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -224,7 +222,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
index 360a4779208c20c373580b992721ec4e425a20b2..59689b709f3abfe6b3d4e14ed32d6df2c2fa5d6a 100644 (file)
@@ -142,7 +142,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --
@@ -205,7 +205,7 @@ bool(false)
 -- Iteration 23 --
 bool(false)
 -- Iteration 24 --
-bool(false)
+%s
 -- Iteration 25 --
 bool(false)
 -- Iteration 26 --