From: Raghubansh Kumar Date: Fri, 14 Sep 2007 19:03:14 +0000 (+0000) Subject: Removing from file dir as it was wrongly committed to this dir X-Git-Tag: php-5.2.5RC1~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec3a713fbb33da4ecdaaa1711b950c8dc06dfdaa;p=php Removing from file dir as it was wrongly committed to this dir --- diff --git a/ext/standard/tests/file/chop_basic.phpt b/ext/standard/tests/file/chop_basic.phpt deleted file mode 100644 index 2b8d3daab7..0000000000 Binary files a/ext/standard/tests/file/chop_basic.phpt and /dev/null differ diff --git a/ext/standard/tests/file/chop_error.phpt b/ext/standard/tests/file/chop_error.phpt deleted file mode 100644 index 4269993a2a..0000000000 --- a/ext/standard/tests/file/chop_error.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test chop() function : error conditions ---FILE-- - ---EXPECTF-- -*** Testing chop() : error conditions *** - --- Testing chop() function with Zero arguments -- - -Warning: Wrong parameter count for chop() in %s on line %d -NULL - --- Testing chop() function with more than expected no. of arguments -- - -Warning: Wrong parameter count for chop() in %s on line %d -NULL -string(11) "string_val " -Done diff --git a/ext/standard/tests/file/chop_variation1.phpt b/ext/standard/tests/file/chop_variation1.phpt deleted file mode 100644 index cbacd435a5..0000000000 --- a/ext/standard/tests/file/chop_variation1.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for str argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // empty string - "", - '', - - // null vlaues - NULL, - null, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var, - - // object - $sample_obj, - - // resource - $file_handle -); - - -// loop through each element of the array and check the working of chop() -// when $str arugment is supplied with different values - -echo "\n--- Testing chop() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( chop($str) ); - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose( $file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing chop() : with unexpected values for str argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing chop() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(0) "" --- Iteration 2 -- -string(1) "1" -string(0) "" --- Iteration 3 -- -string(5) "12345" -string(0) "" --- Iteration 4 -- -string(5) "-2345" -string(1) "-" --- Iteration 5 -- -string(4) "10.5" -string(3) "10." --- Iteration 6 -- -string(5) "-10.5" -string(4) "-10." --- Iteration 7 -- -string(12) "105000000000" -string(0) "" --- Iteration 8 -- -string(7) "1.06E-9" -string(6) "1.06E-" --- Iteration 9 -- -string(3) "0.5" -string(2) "0." --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(5) "Array" - -Notice: Array to string conversion in %s on line %d -string(5) "Array" --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(5) "Array" - -Notice: Array to string conversion in %s on line %d -string(5) "Array" --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(5) "Array" - -Notice: Array to string conversion in %s on line %d -string(5) "Array" --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(5) "Array" - -Notice: Array to string conversion in %s on line %d -string(5) "Array" --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(5) "Array" - -Notice: Array to string conversion in %s on line %d -string(5) "Array" --- Iteration 15 -- -string(1) "1" -string(0) "" --- Iteration 16 -- -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(0) "" --- Iteration 18 -- -string(0) "" -string(0) "" --- Iteration 19 -- -string(0) "" -string(0) "" --- Iteration 20 -- -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" --- Iteration 24 -- -string(0) "" -string(0) "" --- Iteration 25 -- -string(16) " @#$%Object @#$%" -string(11) " @#$%Object" --- Iteration 26 -- -string(14) "Resource id #%d" -string(11) "Resource id" -Done diff --git a/ext/standard/tests/file/chop_variation2.phpt b/ext/standard/tests/file/chop_variation2.phpt deleted file mode 100644 index ca520b0e01..0000000000 --- a/ext/standard/tests/file/chop_variation2.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test chop() function : usage variations - unexpected values for charlist argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new sample(), - - // empty string - "", - '', - - // null vlaues - NULL, - null, - - // resource - $file_handle, - - // undefined variable - $undefined_var, - - // unset variable - $unset_var - -); - - -// loop through each element of the array and check the working of chop() -// when $charlist arugment is supplied with different values - -echo "\n--- Testing chop() by supplying different values for 'charlist' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $charlist = $values [$index]; - - var_dump( chop($str, $charlist) ); - - $counter ++; -} - -// closing the resource -fclose($file_handle); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing chop() : with different unexpected values for charlist argument *** - -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - ---- Testing chop() by supplying different values for 'charlist' argument --- --- Iteration 1 -- -string(17) "hello world12345 " --- Iteration 2 -- -string(17) "hello world12345 " --- Iteration 3 -- -string(17) "hello world12345 " --- Iteration 4 -- -string(17) "hello world12345 " --- Iteration 5 -- -string(17) "hello world12345 " --- Iteration 6 -- -string(17) "hello world12345 " --- Iteration 7 -- -string(17) "hello world12345 " --- Iteration 8 -- -string(17) "hello world12345 " --- Iteration 9 -- -string(17) "hello world12345 " --- Iteration 10 -- - -Notice: Array to string conversion in %s on line %d -string(17) "hello world12345 " --- Iteration 11 -- - -Notice: Array to string conversion in %s on line %d -string(17) "hello world12345 " --- Iteration 12 -- - -Notice: Array to string conversion in %s on line %d -string(17) "hello world12345 " --- Iteration 13 -- - -Notice: Array to string conversion in %s on line %d -string(17) "hello world12345 " --- Iteration 14 -- - -Notice: Array to string conversion in %s on line %d -string(17) "hello world12345 " --- Iteration 15 -- -string(17) "hello world12345 " --- Iteration 16 -- -string(17) "hello world12345 " --- Iteration 17 -- -string(17) "hello world12345 " --- Iteration 18 -- -string(17) "hello world12345 " --- Iteration 19 -- -string(11) "hello world" --- Iteration 20 -- -string(17) "hello world12345 " --- Iteration 21 -- -string(17) "hello world12345 " --- Iteration 22 -- -string(17) "hello world12345 " --- Iteration 23 -- -string(17) "hello world12345 " --- Iteration 24 -- -string(15) "hello world1234" --- Iteration 25 -- -string(17) "hello world12345 " --- Iteration 26 -- -string(17) "hello world12345 " -Done diff --git a/ext/standard/tests/file/chop_variation3.phpt b/ext/standard/tests/file/chop_variation3.phpt deleted file mode 100644 index 9509fb80a4..0000000000 Binary files a/ext/standard/tests/file/chop_variation3.phpt and /dev/null differ diff --git a/ext/standard/tests/file/chop_variation4.phpt b/ext/standard/tests/file/chop_variation4.phpt deleted file mode 100644 index cd269dfa58..0000000000 Binary files a/ext/standard/tests/file/chop_variation4.phpt and /dev/null differ diff --git a/ext/standard/tests/file/chop_variation5.phpt b/ext/standard/tests/file/chop_variation5.phpt deleted file mode 100644 index 8f283e3c3f..0000000000 --- a/ext/standard/tests/file/chop_variation5.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -Test chop() function : usage variations - miscellaneous arguments ---FILE-- - ---EXPECTF-- -*** Testing chop() : with miscellaneous arguments *** -string(9) "chop test" -string(12) "chop test " -string(17) "chop test " -string(17) "chop test " -string(9) "chop test" -string(10) "chop test " -string(9) "chop test" -string(9) "chop test" -string(9) "chop test" -Done diff --git a/ext/standard/tests/file/strncasecmp_basic.phpt b/ext/standard/tests/file/strncasecmp_basic.phpt deleted file mode 100644 index 34a1b08dc4..0000000000 --- a/ext/standard/tests/file/strncasecmp_basic.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test strncasecmp() function : basic functionality ---FILE-- - 0 - -echo "-- Testing strncasecmp() with double quoted string --\n"; -var_dump( strncasecmp("Hello", "Hello", 5) ); //expected: int(0) -var_dump( strncasecmp("Hello", "Hi", 5) ); //expected: value < 0 -var_dump( strncasecmp("Hi", "Hello", 5) ); //expected: value > 0 - -echo "-- Testing strncasecmp() with here-doc string --\n"; -$str = << 0 - -echo "*** Done ***"; -?> ---EXPECTREGEX-- -\*\*\* Testing strncasecmp\(\) function: basic functionality \*\*\* --- Testing strncasecmp\(\) with single quoted string -- -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) --- Testing strncasecmp\(\) with double quoted string -- -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) --- Testing strncasecmp\(\) with here-doc string -- -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) -\*\*\* Done \*\*\* diff --git a/ext/standard/tests/file/strncasecmp_error.phpt b/ext/standard/tests/file/strncasecmp_error.phpt deleted file mode 100644 index 7282ea9541..0000000000 --- a/ext/standard/tests/file/strncasecmp_error.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test strncasecmp() function : error conditions ---FILE-- - ---EXPECTF-- -*** Testing strncasecmp() function: error conditions *** - --- Testing strncasecmp() function with Zero arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d -NULL - --- Testing strncasecmp() function with less than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d -NULL - -Warning: Wrong parameter count for strncasecmp() in %s on line %d -NULL - --- Testing strncasecmp() function with more than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d -NULL - --- Testing strncasecmp() function with invalid argument -- -Warning: Length must be greater than or equal to 0 in %s on line %d -bool(false) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation1.phpt b/ext/standard/tests/file/strncasecmp_variation1.phpt deleted file mode 100644 index bcc6ad3d06..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation1.phpt +++ /dev/null @@ -1,135 +0,0 @@ ---TEST-- -Test strncasecmp() function: usage variations - case-sensitivity ---FILE-- - ---EXPECTF-- -*** Test strncasecmp() function: with alphabets *** --- Passing upper-case letters for 'str1' -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) - --- Passing lower-case letters for 'str1' -- -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation10.phpt b/ext/standard/tests/file/strncasecmp_variation10.phpt deleted file mode 100644 index e06b2b26bf..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation10.phpt +++ /dev/null @@ -1,184 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str1' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp($str1, "string", $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str1' *** --- Iteration 1 -- -int(-%d) --- Iteration 2 -- -int(-%d) --- Iteration 3 -- -int(-%d) --- Iteration 4 -- -int(-%d) --- Iteration 5 -- -int(-%d) --- Iteration 6 -- -int(-%d) --- Iteration 7 -- -int(-%d) --- Iteration 8 -- -int(-%d) --- Iteration 9 -- -int(-%d) --- Iteration 10 -- -int(-%d) --- Iteration 11 -- -int(-%d) --- Iteration 12 -- -int(-%d) --- Iteration 13 -- -int(-%d) --- Iteration 14 -- -int(-%d) --- Iteration 15 -- - -Notice: Array to string conversion in %s on line 88 - -Notice: Array to string conversion in %s on line 89 -int(-%d) --- Iteration 16 -- - -Notice: Array to string conversion in %s on line 88 - -Notice: Array to string conversion in %s on line 89 -int(-%d) --- Iteration 17 -- - -Notice: Array to string conversion in %s on line 88 - -Notice: Array to string conversion in %s on line 89 -int(-%d) --- Iteration 18 -- - -Notice: Array to string conversion in %s on line 88 - -Notice: Array to string conversion in %s on line 89 -int(-%d) --- Iteration 19 -- - -Notice: Array to string conversion in %s on line 88 - -Notice: Array to string conversion in %s on line 89 -int(-%d) --- Iteration 20 -- -int(-%d) --- Iteration 21 -- -int(-%d) --- Iteration 22 -- -int(-%d) --- Iteration 23 -- -int(-%d) --- Iteration 24 -- -int(-%d) --- Iteration 25 -- -int(-%d) --- Iteration 26 -- -int(-%d) --- Iteration 27 -- -int(-%d) --- Iteration 28 -- -int(-%d) --- Iteration 29 -- -int(-%d) --- Iteration 30 -- -int(-%d) --- Iteration 31 -- -int(-%d) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation11.phpt b/ext/standard/tests/file/strncasecmp_variation11.phpt deleted file mode 100644 index f756c6c006..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation11.phpt +++ /dev/null @@ -1,185 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str2' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $str2 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp("string", $str2, $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str2' *** --- Iteration 1 -- -int(%d) --- Iteration 2 -- -int(%d) --- Iteration 3 -- -int(%d) --- Iteration 4 -- -int(%d) --- Iteration 5 -- -int(%d) --- Iteration 6 -- -int(%d) --- Iteration 7 -- -int(%d) --- Iteration 8 -- -int(%d) --- Iteration 9 -- -int(%d) --- Iteration 10 -- -int(%d) --- Iteration 11 -- -int(%d) --- Iteration 12 -- -int(%d) --- Iteration 13 -- -int(%d) --- Iteration 14 -- -int(%d) --- Iteration 15 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(%d) --- Iteration 16 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(%d) --- Iteration 17 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(%d) --- Iteration 18 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(%d) --- Iteration 19 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(%d) --- Iteration 20 -- -int(%d) --- Iteration 21 -- -int(%d) --- Iteration 22 -- -int(%d) --- Iteration 23 -- -int(%d) --- Iteration 24 -- -int(%d) --- Iteration 25 -- -int(%d) --- Iteration 26 -- -int(%d) --- Iteration 27 -- -int(%d) --- Iteration 28 -- -int(%d) --- Iteration 29 -- -int(%d) --- Iteration 30 -- -int(%d) --- Iteration 31 -- -int(%d) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation2.phpt b/ext/standard/tests/file/strncasecmp_variation2.phpt deleted file mode 100644 index a6f8c1ebb8..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation2.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -Test strncasecmp() function: usage variations - double quoted strings ---FILE-- - ---EXPECTREGEX-- -\*\*\* Test strncasecmp\(\) function: with double quoted strings \*\*\* --- Iteration 1 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) --- Iteration 2 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) --- Iteration 3 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) -int\([1-9][0-9]*\) --- Iteration 4 -- -int\([1-9][0-9]*\) -int\([1-9][0-9]*\) -int\([1-9][0-9]*\) -int\(0\) -int\([1-9][0-9]*\) --- Iteration 5 -- -int\(-[1-9][0-9]*\) -int\(-[1-9][0-9]*\) -int\(-[1-9][0-9]*\) -int\(-[1-9][0-9]*\) -int\(0\) -\*\*\* Done \*\*\* diff --git a/ext/standard/tests/file/strncasecmp_variation3.phpt b/ext/standard/tests/file/strncasecmp_variation3.phpt deleted file mode 100644 index 8409260b2e..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation3.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -Test strncasecmp() function: usage variations - various lengths ---FILE-- -= 0; $len--) { - var_dump( strncasecmp($str1, $str2, $len) ); -} -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Test strncasecmp() function: with different lengths *** -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -int(0) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation4.phpt b/ext/standard/tests/file/strncasecmp_variation4.phpt deleted file mode 100644 index 3f73aa3518..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation4.phpt +++ /dev/null @@ -1,195 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'str1' & 'str2' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str1 = $values[$index]; - $str2 = $values[$index]; - $len = strlen($values[$index]) + 1; - var_dump( strncasecmp($str1, $str2, $len) ); - $counter ++; -} - -fclose($file_handle); //closing the file handle - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Testing strncasecmp() function: with unexpected values for 'str1' and 'str2' *** --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- -int(0) --- Iteration 9 -- -int(0) --- Iteration 10 -- -int(0) --- Iteration 11 -- -int(0) --- Iteration 12 -- -int(0) --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(0) --- Iteration 15 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) --- Iteration 16 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) --- Iteration 17 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) --- Iteration 18 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) --- Iteration 19 -- - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) --- Iteration 23 -- -int(0) --- Iteration 24 -- -int(0) --- Iteration 25 -- -int(0) --- Iteration 26 -- -int(0) --- Iteration 27 -- -int(0) --- Iteration 28 -- -int(0) --- Iteration 29 -- -int(0) --- Iteration 30 -- -int(0) --- Iteration 31 -- -int(0) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation5.phpt b/ext/standard/tests/file/strncasecmp_variation5.phpt deleted file mode 100644 index 4a9fa89a7c..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation5.phpt +++ /dev/null @@ -1,147 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - unexpected values for 'len' ---FILE-- - 'red', 'item' => 'pen'), - - /* boolean values */ - true, - false, - TRUE, - FALSE, - - /* nulls */ - NULL, - null, - - /* empty string */ - "", - '', - - /* undefined variable */ - @$undefined_var, - - /* unset variable */ - @$unset_var, - - /* resource */ - $file_handle, - - /* object */ - new sample() -); - -/* loop through each element of the array and check the working of strncasecmp() */ -$counter = 1; -for($index = 0; $index < count($lengths); $index ++) { - $len = $lengths[$index]; - echo "-- Iteration $counter --\n"; - var_dump( strncasecmp($str1, $str2, $len) ); - $counter ++; -} -fclose($file_handle); - -echo "*** Done ***\n"; -?> ---EXPECTF-- -*** Test strncasecmp() function: unexpected values for 'len' *** --- Iteration 1 -- -int(0) --- Iteration 2 -- -int(0) --- Iteration 3 -- -int(0) --- Iteration 4 -- -int(0) --- Iteration 5 -- -int(0) --- Iteration 6 -- -int(0) --- Iteration 7 -- -int(0) --- Iteration 8 -- -int(0) --- Iteration 9 -- -int(0) --- Iteration 10 -- -int(0) --- Iteration 11 -- -int(0) --- Iteration 12 -- -int(0) --- Iteration 13 -- -int(0) --- Iteration 14 -- -int(0) --- Iteration 15 -- -int(0) --- Iteration 16 -- -int(0) --- Iteration 17 -- -int(0) --- Iteration 18 -- -int(0) --- Iteration 19 -- -int(0) --- Iteration 20 -- -int(0) --- Iteration 21 -- -int(0) --- Iteration 22 -- -int(0) --- Iteration 23 -- -int(0) --- Iteration 24 -- - -Notice: Object of class sample could not be converted to int in %s on line %d -int(0) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation6.phpt b/ext/standard/tests/file/strncasecmp_variation6.phpt deleted file mode 100644 index 765032b773..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation6.phpt +++ /dev/null @@ -1,810 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - binary safe - all ASCII chars ---FILE-- - ---EXPECTF-- -*** Test strncasecmp() function: with binary inputs *** - --- Checking with all 256 characters given, in binary format -- --- Iteration 1 -- -int(0) -int(0) --- Iteration 2 -- -int(0) -int(0) --- Iteration 3 -- -int(0) -int(0) --- Iteration 4 -- -int(0) -int(0) --- Iteration 5 -- -int(0) -int(0) --- Iteration 6 -- -int(0) -int(0) --- Iteration 7 -- -int(0) -int(0) --- Iteration 8 -- -int(0) -int(0) --- Iteration 9 -- -int(0) -int(0) --- Iteration 10 -- -int(0) -int(0) --- Iteration 11 -- -int(0) -int(0) --- Iteration 12 -- -int(0) -int(0) --- Iteration 13 -- -int(0) -int(0) --- Iteration 14 -- -int(0) -int(0) --- Iteration 15 -- -int(0) -int(0) --- Iteration 16 -- -int(0) -int(0) --- Iteration 17 -- -int(0) -int(0) --- Iteration 18 -- -int(0) -int(0) --- Iteration 19 -- -int(0) -int(0) --- Iteration 20 -- -int(0) -int(0) --- Iteration 21 -- -int(0) -int(0) --- Iteration 22 -- -int(0) -int(0) --- Iteration 23 -- -int(0) -int(0) --- Iteration 24 -- -int(0) -int(0) --- Iteration 25 -- -int(0) -int(0) --- Iteration 26 -- -int(0) -int(0) --- Iteration 27 -- -int(0) -int(0) --- Iteration 28 -- -int(0) -int(0) --- Iteration 29 -- -int(0) -int(0) --- Iteration 30 -- -int(0) -int(0) --- Iteration 31 -- -int(0) -int(0) --- Iteration 32 -- -int(0) -int(0) --- Iteration 33 -- -int(0) -int(0) --- Iteration 34 -- -int(0) -int(0) --- Iteration 35 -- -int(0) -int(0) --- Iteration 36 -- -int(0) -int(0) --- Iteration 37 -- -int(0) -int(0) --- Iteration 38 -- -int(0) -int(0) --- Iteration 39 -- -int(0) -int(0) --- Iteration 40 -- -int(0) -int(0) --- Iteration 41 -- -int(0) -int(0) --- Iteration 42 -- -int(0) -int(0) --- Iteration 43 -- -int(0) -int(0) --- Iteration 44 -- -int(0) -int(0) --- Iteration 45 -- -int(0) -int(0) --- Iteration 46 -- -int(0) -int(0) --- Iteration 47 -- -int(0) -int(0) --- Iteration 48 -- -int(0) -int(0) --- Iteration 49 -- -int(0) -int(0) --- Iteration 50 -- -int(0) -int(0) --- Iteration 51 -- -int(0) -int(0) --- Iteration 52 -- -int(0) -int(0) --- Iteration 53 -- -int(0) -int(0) --- Iteration 54 -- -int(0) -int(0) --- Iteration 55 -- -int(0) -int(0) --- Iteration 56 -- -int(0) -int(0) --- Iteration 57 -- -int(0) -int(0) --- Iteration 58 -- -int(0) -int(0) --- Iteration 59 -- -int(0) -int(0) --- Iteration 60 -- -int(0) -int(0) --- Iteration 61 -- -int(0) -int(0) --- Iteration 62 -- -int(0) -int(0) --- Iteration 63 -- -int(0) -int(0) --- Iteration 64 -- -int(0) -int(0) --- Iteration 65 -- -int(0) -int(0) --- Iteration 66 -- -int(0) -int(0) --- Iteration 67 -- -int(0) -int(0) --- Iteration 68 -- -int(0) -int(0) --- Iteration 69 -- -int(0) -int(0) --- Iteration 70 -- -int(0) -int(0) --- Iteration 71 -- -int(0) -int(0) --- Iteration 72 -- -int(0) -int(0) --- Iteration 73 -- -int(0) -int(0) --- Iteration 74 -- -int(0) -int(0) --- Iteration 75 -- -int(0) -int(0) --- Iteration 76 -- -int(0) -int(0) --- Iteration 77 -- -int(0) -int(0) --- Iteration 78 -- -int(0) -int(0) --- Iteration 79 -- -int(0) -int(0) --- Iteration 80 -- -int(0) -int(0) --- Iteration 81 -- -int(0) -int(0) --- Iteration 82 -- -int(0) -int(0) --- Iteration 83 -- -int(0) -int(0) --- Iteration 84 -- -int(0) -int(0) --- Iteration 85 -- -int(0) -int(0) --- Iteration 86 -- -int(0) -int(0) --- Iteration 87 -- -int(0) -int(0) --- Iteration 88 -- -int(0) -int(0) --- Iteration 89 -- -int(0) -int(0) --- Iteration 90 -- -int(0) -int(0) --- Iteration 91 -- -int(0) -int(0) --- Iteration 92 -- -int(0) -int(0) --- Iteration 93 -- -int(0) -int(0) --- Iteration 94 -- -int(0) -int(0) --- Iteration 95 -- -int(0) -int(0) --- Iteration 96 -- -int(0) -int(0) --- Iteration 97 -- -int(0) -int(0) --- Iteration 98 -- -int(0) -int(0) --- Iteration 99 -- -int(0) -int(0) --- Iteration 100 -- -int(0) -int(0) --- Iteration 101 -- -int(0) -int(0) --- Iteration 102 -- -int(0) -int(0) --- Iteration 103 -- -int(0) -int(0) --- Iteration 104 -- -int(0) -int(0) --- Iteration 105 -- -int(0) -int(0) --- Iteration 106 -- -int(0) -int(0) --- Iteration 107 -- -int(0) -int(0) --- Iteration 108 -- -int(0) -int(0) --- Iteration 109 -- -int(0) -int(0) --- Iteration 110 -- -int(0) -int(0) --- Iteration 111 -- -int(0) -int(0) --- Iteration 112 -- -int(0) -int(0) --- Iteration 113 -- -int(0) -int(0) --- Iteration 114 -- -int(0) -int(0) --- Iteration 115 -- -int(0) -int(0) --- Iteration 116 -- -int(0) -int(0) --- Iteration 117 -- -int(0) -int(0) --- Iteration 118 -- -int(0) -int(0) --- Iteration 119 -- -int(0) -int(0) --- Iteration 120 -- -int(0) -int(0) --- Iteration 121 -- -int(0) -int(0) --- Iteration 122 -- -int(0) -int(0) --- Iteration 123 -- -int(0) -int(0) --- Iteration 124 -- -int(0) -int(0) --- Iteration 125 -- -int(0) -int(0) --- Iteration 126 -- -int(0) -int(0) --- Iteration 127 -- -int(0) -int(0) --- Iteration 128 -- -int(0) -int(0) --- Iteration 129 -- -int(0) -int(0) --- Iteration 130 -- -int(0) -int(0) --- Iteration 131 -- -int(0) -int(0) --- Iteration 132 -- -int(0) -int(0) --- Iteration 133 -- -int(0) -int(0) --- Iteration 134 -- -int(0) -int(0) --- Iteration 135 -- -int(0) -int(0) --- Iteration 136 -- -int(0) -int(0) --- Iteration 137 -- -int(0) -int(0) --- Iteration 138 -- -int(0) -int(0) --- Iteration 139 -- -int(0) -int(0) --- Iteration 140 -- -int(0) -int(0) --- Iteration 141 -- -int(0) -int(0) --- Iteration 142 -- -int(0) -int(0) --- Iteration 143 -- -int(0) -int(0) --- Iteration 144 -- -int(0) -int(0) --- Iteration 145 -- -int(0) -int(0) --- Iteration 146 -- -int(0) -int(0) --- Iteration 147 -- -int(0) -int(0) --- Iteration 148 -- -int(0) -int(0) --- Iteration 149 -- -int(0) -int(0) --- Iteration 150 -- -int(0) -int(0) --- Iteration 151 -- -int(0) -int(0) --- Iteration 152 -- -int(0) -int(0) --- Iteration 153 -- -int(0) -int(0) --- Iteration 154 -- -int(0) -int(0) --- Iteration 155 -- -int(0) -int(0) --- Iteration 156 -- -int(0) -int(0) --- Iteration 157 -- -int(0) -int(0) --- Iteration 158 -- -int(0) -int(0) --- Iteration 159 -- -int(0) -int(0) --- Iteration 160 -- -int(0) -int(0) --- Iteration 161 -- -int(0) -int(0) --- Iteration 162 -- -int(0) -int(0) --- Iteration 163 -- -int(0) -int(0) --- Iteration 164 -- -int(0) -int(0) --- Iteration 165 -- -int(0) -int(0) --- Iteration 166 -- -int(0) -int(0) --- Iteration 167 -- -int(0) -int(0) --- Iteration 168 -- -int(0) -int(0) --- Iteration 169 -- -int(0) -int(0) --- Iteration 170 -- -int(0) -int(0) --- Iteration 171 -- -int(0) -int(0) --- Iteration 172 -- -int(0) -int(0) --- Iteration 173 -- -int(0) -int(0) --- Iteration 174 -- -int(0) -int(0) --- Iteration 175 -- -int(0) -int(0) --- Iteration 176 -- -int(0) -int(0) --- Iteration 177 -- -int(0) -int(0) --- Iteration 178 -- -int(0) -int(0) --- Iteration 179 -- -int(0) -int(0) --- Iteration 180 -- -int(0) -int(0) --- Iteration 181 -- -int(0) -int(0) --- Iteration 182 -- -int(0) -int(0) --- Iteration 183 -- -int(0) -int(0) --- Iteration 184 -- -int(0) -int(0) --- Iteration 185 -- -int(0) -int(0) --- Iteration 186 -- -int(0) -int(0) --- Iteration 187 -- -int(0) -int(0) --- Iteration 188 -- -int(0) -int(0) --- Iteration 189 -- -int(0) -int(0) --- Iteration 190 -- -int(0) -int(0) --- Iteration 191 -- -int(0) -int(0) --- Iteration 192 -- -int(0) -int(0) --- Iteration 193 -- -int(0) -int(0) --- Iteration 194 -- -int(0) -int(0) --- Iteration 195 -- -int(0) -int(0) --- Iteration 196 -- -int(0) -int(0) --- Iteration 197 -- -int(0) -int(0) --- Iteration 198 -- -int(0) -int(0) --- Iteration 199 -- -int(0) -int(0) --- Iteration 200 -- -int(0) -int(0) --- Iteration 201 -- -int(0) -int(0) --- Iteration 202 -- -int(0) -int(0) --- Iteration 203 -- -int(0) -int(0) --- Iteration 204 -- -int(0) -int(0) --- Iteration 205 -- -int(0) -int(0) --- Iteration 206 -- -int(0) -int(0) --- Iteration 207 -- -int(0) -int(0) --- Iteration 208 -- -int(0) -int(0) --- Iteration 209 -- -int(0) -int(0) --- Iteration 210 -- -int(0) -int(0) --- Iteration 211 -- -int(0) -int(0) --- Iteration 212 -- -int(0) -int(0) --- Iteration 213 -- -int(0) -int(0) --- Iteration 214 -- -int(0) -int(0) --- Iteration 215 -- -int(0) -int(0) --- Iteration 216 -- -int(0) -int(0) --- Iteration 217 -- -int(0) -int(0) --- Iteration 218 -- -int(0) -int(0) --- Iteration 219 -- -int(0) -int(0) --- Iteration 220 -- -int(0) -int(0) --- Iteration 221 -- -int(0) -int(0) --- Iteration 222 -- -int(0) -int(0) --- Iteration 223 -- -int(0) -int(0) --- Iteration 224 -- -int(0) -int(0) --- Iteration 225 -- -int(0) -int(0) --- Iteration 226 -- -int(0) -int(0) --- Iteration 227 -- -int(0) -int(0) --- Iteration 228 -- -int(0) -int(0) --- Iteration 229 -- -int(0) -int(0) --- Iteration 230 -- -int(0) -int(0) --- Iteration 231 -- -int(0) -int(0) --- Iteration 232 -- -int(0) -int(0) --- Iteration 233 -- -int(0) -int(0) --- Iteration 234 -- -int(0) -int(0) --- Iteration 235 -- -int(0) -int(0) --- Iteration 236 -- -int(0) -int(0) --- Iteration 237 -- -int(0) -int(0) --- Iteration 238 -- -int(0) -int(0) --- Iteration 239 -- -int(0) -int(0) --- Iteration 240 -- -int(0) -int(0) --- Iteration 241 -- -int(0) -int(0) --- Iteration 242 -- -int(0) -int(0) --- Iteration 243 -- -int(0) -int(0) --- Iteration 244 -- -int(0) -int(0) --- Iteration 245 -- -int(0) -int(0) --- Iteration 246 -- -int(0) -int(0) --- Iteration 247 -- -int(0) -int(0) --- Iteration 248 -- -int(0) -int(0) --- Iteration 249 -- -int(0) -int(0) --- Iteration 250 -- -int(0) -int(0) --- Iteration 251 -- -int(0) -int(0) --- Iteration 252 -- -int(0) -int(0) --- Iteration 253 -- -int(0) -int(0) --- Iteration 254 -- -int(0) -int(0) --- Iteration 255 -- -int(0) -int(0) --- Iteration 256 -- -int(0) -int(0) - --- Checking with out of character's range, given in binary format -- -int(1) - -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation7.phpt b/ext/standard/tests/file/strncasecmp_variation7.phpt deleted file mode 100644 index e22fad7659..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation7.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test strncasecmp() function : usage variations - binary safe ---FILE-- - ---EXPECTF-- -*** Test strncasecmp() function: with null terminated strings and binary inputs *** -int(5) -int(-119) -*** Done *** diff --git a/ext/standard/tests/file/strncasecmp_variation8.phpt b/ext/standard/tests/file/strncasecmp_variation8.phpt deleted file mode 100644 index 6011a7b0fd..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation8.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test strncasecmp() function: usage variations - single quoted strings ---FILE-- - ---EXPECTREGEX-- -\*\*\* Test strncasecmp\(\) function: with single quoted strings \*\*\* --- Iteration 1 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) --- Iteration 2 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) --- Iteration 3 -- -int\(0\) -int\(0\) -int\(0\) -int\(-[1-9][0-9]*\) --- Iteration 4 -- -int\([1-9][0-9]*\) -int\([1-9][0-9]*\) -int\([1-9][0-9]*\) -int\(0\) -\*\*\* Done \*\*\* diff --git a/ext/standard/tests/file/strncasecmp_variation9.phpt b/ext/standard/tests/file/strncasecmp_variation9.phpt deleted file mode 100644 index 0d713032e0..0000000000 --- a/ext/standard/tests/file/strncasecmp_variation9.phpt +++ /dev/null @@ -1,92 +0,0 @@ ---TEST-- -Test strncasecmp() function: usage variations - heredoc strings ---FILE-- - ---EXPECTF-- -*** Test strncasecmp() function: with here-doc strings *** -int(0) -int(63) -int(0) -int(84) -int(0) -int(-1) -int(0) -int(0) -int(0) -int(1) -int(0) -int(0) -int(0) -int(0) -*** Done *** diff --git a/ext/standard/tests/file/wordwrap_basic.phpt b/ext/standard/tests/file/wordwrap_basic.phpt deleted file mode 100644 index 84a7f7335c..0000000000 --- a/ext/standard/tests/file/wordwrap_basic.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -Test wordwrap() function : basic functionality ---FILE-- -\n'; - -// Calling wordwrap() with default arguments -var_dump( wordwrap($str) ); - -// Calling wordwrap() with all possible optional arguments -// with $width arg -var_dump( wordwrap($str, $width) ); -// with $break arg -var_dump( wordwrap($str, $width, $break) ); - -// Calling wordwrap() with all arguments -// $cut as true -$width = 10; -$cut = true; -var_dump( wordwrap($str, $width, $break, $cut) ); - -// $cut as false -$width = 10; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : basic functionality *** -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(96) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy -doooooooooooooooooooooog." -string(103) "The quick brown foooooooooox jummmmmmmmmmmmped over the lazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -string(178) "The quick
\nbrown
\nfooooooooo
\nox
\njummmmmmmm
\nmmmmped
\nover the
\nlazzzzzzzz
\nzzzy
\ndooooooooo
\noooooooooo
\nooog." -string(138) "The quick
\nbrown
\nfoooooooooox
\njummmmmmmmmmmmped
\nover the
\nlazzzzzzzzzzzy
\ndoooooooooooooooooooooog." -Done diff --git a/ext/standard/tests/file/wordwrap_error.phpt b/ext/standard/tests/file/wordwrap_error.phpt deleted file mode 100644 index 98f199abc6..0000000000 --- a/ext/standard/tests/file/wordwrap_error.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---TEST-- -Test wordwrap() function : error conditions ---FILE-- -\n'; -$cut = true; -$extra_arg = "extra_arg"; - -var_dump( wordwrap($str, $width, $break, $cut, $extra_arg) ); - -// $width arg as negative value -echo "\n-- Testing wordwrap() function with negative/zero value for width argument --\n"; -echo "-- width = 0 & cut = false --\n"; -// width as zero and cut as false -$width = 0; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = 0 & cut = true --\n"; -// width as zero and cut as true -$width = 0; -$cut = true; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = -10 & cut = false --\n"; -// width as -ne and cut as false -$width = -10; -$cut = false; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "-- width = -10 & cut = true --\n"; -// width as -ne and cut as true -$width = -10; -$cut = true; -var_dump( wordwrap($str, $width, $break, $cut) ); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : error conditions *** - --- Testing wordwrap() function with Zero arguments -- - -Warning: wordwrap() expects at least 1 parameter, 0 given in %s on line %d -NULL - --- Testing wordwrap() function with more than expected no. of arguments -- - -Warning: wordwrap() expects at most 4 parameters, 5 given in %s on line %d -NULL - --- Testing wordwrap() function with negative/zero value for width argument -- --- width = 0 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = 0 & cut = true -- - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- width = -10 & cut = false -- -string(39) "testing
\nwordwrap
\nfunction" --- width = -10 & cut = true -- -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" -Done diff --git a/ext/standard/tests/file/wordwrap_variation1.phpt b/ext/standard/tests/file/wordwrap_variation1.phpt deleted file mode 100644 index f5a172e9a1..0000000000 --- a/ext/standard/tests/file/wordwrap_variation1.phpt +++ /dev/null @@ -1,335 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for str argument ---FILE-- -\n'; -$cut = true; - -// resource variable -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 'string_val'; -unset($unset_var); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // Null - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $str arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'str' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $str = $values [$index]; - - var_dump( wordwrap($str) ); - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'str' argument --- --- Iteration 1 -- -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" -string(1) "0" --- Iteration 2 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 3 -- -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(5) "12345" -string(13) "123
\n45" --- Iteration 4 -- -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" -string(13) "-23
\n45" --- Iteration 5 -- -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" -string(12) "10.
\n5" --- Iteration 6 -- -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" -string(13) "-10
\n.5" --- Iteration 7 -- -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(12) "105000000000" -string(36) "105
\n000
\n000
\n000" --- Iteration 8 -- -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(7) "1.06E-9" -string(23) "1.0
\n6E-
\n9" --- Iteration 9 -- -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 16 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 17 -- -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" --- Iteration 18 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 19 -- - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, object given in %s on line %d -NULL --- Iteration 20 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 21 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 22 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 23 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 24 -- - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 1 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" --- Iteration 26 -- -string(0) "" -string(0) "" -string(0) "" -string(0) "" -string(0) "" -Done diff --git a/ext/standard/tests/file/wordwrap_variation2.phpt b/ext/standard/tests/file/wordwrap_variation2.phpt deleted file mode 100644 index 2718791943..0000000000 --- a/ext/standard/tests/file/wordwrap_variation2.phpt +++ /dev/null @@ -1,340 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexpected values for width argument ---FILE-- -\n'; -$cut = true; - -// resource var -$fp = fopen(__FILE__, "r"); - -// get an unset variable -$unset_var = 10; -unset($unset_var); - - -// array with different values as width -$values = array ( - // zerovalue for width - 0, - - // -ve value for width - -1, - -10, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // Null value - NULL, - null, - - // empty string - "", - '', - - // resource variable - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - - -// loop though each element of the array and check the working of wordwrap() -// when $width arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'width' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $width = $values [$index]; - - var_dump( wordwrap($str, $width) ); - var_dump( wordwrap($str, $width, $break) ); - - // cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'width' argument --- --- Iteration 1 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 2 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 3 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(223) "
\nt
\ne
\ns
\nt
\ni
\nn
\ng
\n
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\n
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 4 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 5 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 6 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 7 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 8 -- - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, array given in %s on line %d -NULL --- Iteration 9 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 10 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 11 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" -string(199) "t
\ne
\ns
\nt
\ni
\nn
\ng
\nw
\no
\nr
\nd
\nw
\nr
\na
\np
\nf
\nu
\nn
\nc
\nt
\ni
\no
\nn" --- Iteration 12 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 15 -- - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, object given in %s on line %d -NULL --- Iteration 16 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 18 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 19 -- - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, string given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 2 to be long, resource given in %s on line %d -NULL --- Iteration 21 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) --- Iteration 22 -- -string(25) "testing -wordwrap -function" -string(39) "testing
\nwordwrap
\nfunction" -string(39) "testing
\nwordwrap
\nfunction" - -Warning: wordwrap(): Can't force cut when width is zero in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/file/wordwrap_variation3.phpt b/ext/standard/tests/file/wordwrap_variation3.phpt deleted file mode 100644 index 0a71944b4e..0000000000 --- a/ext/standard/tests/file/wordwrap_variation3.phpt +++ /dev/null @@ -1,302 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected values for break argument ---INI-- ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new stdclass(), - - // empty string - "", - '', - - //Null - NULL, - null, - - // resource var - $fp, - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $break arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'break' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $break = $values [$index]; - - var_dump( wordwrap($str, $width, $break) ); - - // $cut as false - $cut = false; - var_dump( wordwrap($str, $width, $break, $cut) ); - - // $cut as true - $cut = true; - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource used -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'break' argument --- --- Iteration 1 -- -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" -string(25) "testing0wordwrap0function" --- Iteration 2 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 3 -- -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" -string(33) "testing12345wordwrap12345function" --- Iteration 4 -- -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" -string(33) "testing-2345wordwrap-2345function" --- Iteration 5 -- -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" -string(31) "testing10.5wordwrap10.5function" --- Iteration 6 -- -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" -string(33) "testing-10.5wordwrap-10.5function" --- Iteration 7 -- -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" -string(47) "testing105000000000wordwrap105000000000function" --- Iteration 8 -- -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" -string(37) "testing1.06E-9wordwrap1.06E-9function" --- Iteration 9 -- -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" -string(29) "testing0.5wordwrap0.5function" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, array given in %s on line %d -NULL --- Iteration 15 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 16 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 17 -- -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" -string(25) "testing1wordwrap1function" --- Iteration 18 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 19 -- - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, object given in %s on line %d -NULL --- Iteration 20 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 24 -- - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL - -Warning: wordwrap() expects parameter 3 to be string, resource given in %s on line %d -NULL --- Iteration 25 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) --- Iteration 26 -- - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) - -Warning: wordwrap(): Break string cannot be empty in %s on line %d -bool(false) -Done diff --git a/ext/standard/tests/file/wordwrap_variation4.phpt b/ext/standard/tests/file/wordwrap_variation4.phpt deleted file mode 100644 index 440e93740a..0000000000 --- a/ext/standard/tests/file/wordwrap_variation4.phpt +++ /dev/null @@ -1,144 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - unexptected value for cut argument ---FILE-- -\n'; - -// get an unset variable -$unset_var = true; -unset($unset_var); - -// resource variable -$fp = fopen(__FILE__, "r"); - -// array with different values -$values = array ( - - // integer values - 0, - 1, - 12345, - -2345, - - // float values - 10.5, - -10.5, - 10.5e10, - 10.6E-10, - .5, - - // array values - array(), - array(0), - array(1), - array(1, 2), - array('color' => 'red', 'item' => 'pen'), - - // string values - "string", - 'string', - - // objects - new stdclass(), - - // empty string - "", - '', - - // undefined variable - @$undefined_var, - - // unset variable - @$unset_var -); - -// loop though each element of the array and check the working of wordwrap() -// when $cut arugment is supplied with different values -echo "\n--- Testing wordwrap() by supplying different values for 'cut' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $cut = $values [$index]; - - var_dump( wordwrap($str, $width, $break, $cut) ); - - $counter ++; -} - -// close the resource -fclose($fp); - -echo "Done\n"; -?> ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - ---- Testing wordwrap() by supplying different values for 'cut' argument --- --- Iteration 1 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 2 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 3 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 4 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 5 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 6 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 7 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 8 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 9 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 10 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 11 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 12 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 13 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 14 -- - -Warning: wordwrap() expects parameter 4 to be boolean, array given in %s on line %d -NULL --- Iteration 15 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 16 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 17 -- - -Warning: wordwrap() expects parameter 4 to be boolean, object given in %s on line %d -NULL --- Iteration 18 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 19 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 20 -- -string(39) "testing
\nwordwrap
\nfunction" --- Iteration 21 -- -string(39) "testing
\nwordwrap
\nfunction" -Done diff --git a/ext/standard/tests/file/wordwrap_variation5.phpt b/ext/standard/tests/file/wordwrap_variation5.phpt deleted file mode 100644 index b0911a899c..0000000000 --- a/ext/standard/tests/file/wordwrap_variation5.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -Test wordwrap() function : usage variations - valid break arguments(spaces) ---FILE-- - ---EXPECTF-- -*** Testing wordwrap() : usage variations *** - --- Testing wordwrap() with default break value and single space as value -- --- with default break and cut value -- -string(24) "Testing -wordrap -function" --- with default cut value -- -string(24) "Testing wordrap function" -string(26) "Testing wordrap function" --- with cut value as false -- -string(24) "Testing wordrap function" -string(26) "Testing wordrap function" --- with cut value as true -- -string(43) "T e s t i n g w o r d r a p f u n c t i o n" -string(64) "T e s t i n g w o r d r a p f u n c t i o n" -Done