From: Raghubansh Kumar Date: Fri, 9 Nov 2007 07:19:00 +0000 (+0000) Subject: fix tests: better float values X-Git-Tag: RELEASE_1_3_1~682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54f6189445de26d141bb0640ae67225f1daac286;p=php fix tests: better float values --- diff --git a/ext/standard/tests/strings/chunk_split_variation1.phpt b/ext/standard/tests/strings/chunk_split_variation1.phpt index 58cb0515c3..624587ceda 100644 --- a/ext/standard/tests/strings/chunk_split_variation1.phpt +++ b/ext/standard/tests/strings/chunk_split_variation1.phpt @@ -42,8 +42,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -111,30 +111,30 @@ string(6) "10 .5 " -- Iteration 6 -- string(8) "-1 0. 5 " -- Iteration 7 -- -string(18) "10 50 00 00 00 00 " +string(18) "10 12 34 56 70 00 " -- Iteration 8 -- -string(11) "1. 06 E- 9 " +string(20) "1. 07 65 43 21 E- 9 " -- Iteration 9 -- string(5) "0. 5 " -- Iteration 10 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 87 string(8) "Ar ra y " -- Iteration 11 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 87 string(8) "Ar ra y " -- Iteration 12 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 87 string(8) "Ar ra y " -- Iteration 13 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 87 string(8) "Ar ra y " -- Iteration 14 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 87 string(8) "Ar ra y " -- Iteration 15 -- string(1) " " @@ -163,5 +163,5 @@ string(1) " " -- Iteration 27 -- string(1) " " -- Iteration 28 -- -string(%d) "Re so ur ce i d #%d " -Done +string(%d) "Re so ur ce i d #%s " +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt index 3498f5fce6..924e6e21ff 100644 --- a/ext/standard/tests/strings/chunk_split_variation2.phpt +++ b/ext/standard/tests/strings/chunk_split_variation2.phpt @@ -35,8 +35,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -98,7 +98,9 @@ string(28) "This is ch*uklen vari*ation*" Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d bool(false) -- Iteration 3 -- -string(26) "This is chuklen variation*" + +Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +bool(false) -- Iteration 4 -- Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d @@ -168,5 +170,5 @@ bool(false) Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d bool(false) -- Iteration 24 -- -string(30) "This *is ch*uklen* vari*ation*" -Done +string(%d) "%s" +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/chunk_split_variation3.phpt b/ext/standard/tests/strings/chunk_split_variation3.phpt index 00dbbdeee4..f314990c79 100644 --- a/ext/standard/tests/strings/chunk_split_variation3.phpt +++ b/ext/standard/tests/strings/chunk_split_variation3.phpt @@ -42,8 +42,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.123456e10, + 10.7654321E-10, .5, // array data @@ -106,9 +106,9 @@ string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5" -- Iteration 6 -- string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5" -- Iteration 7 -- -string(94) "This105000000000 is 105000000000simp105000000000le s105000000000trin105000000000g.105000000000" +string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000" -- Iteration 8 -- -string(64) "This1.06E-9 is 1.06E-9simp1.06E-9le s1.06E-9trin1.06E-9g.1.06E-9" +string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9" -- Iteration 9 -- string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5" -- Iteration 10 -- @@ -155,4 +155,4 @@ string(22) "This is simple string." string(22) "This is simple string." -- Iteration 26 -- string(%d) "ThisResource id #%d is Resource id #%dsimpResource id #%dle sResource id #%dtrinResource id #%dg.Resource id #%d" -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/crc32_variation1.phpt b/ext/standard/tests/strings/crc32_variation1.phpt index de7ca5d25a..cfd4779091 100644 --- a/ext/standard/tests/strings/crc32_variation1.phpt +++ b/ext/standard/tests/strings/crc32_variation1.phpt @@ -46,8 +46,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -90,6 +90,7 @@ $count = 1; foreach($values as $value) { echo "\n-- Iteration $count --\n"; var_dump( crc32($value) ); + $count++; }; // closing the resource @@ -107,90 +108,90 @@ Notice: Undefined variable: unset_var in %s on line %d -- Iteration 1 -- int(-186917087) --- Iteration 1 -- +-- Iteration 2 -- int(-2082672713) --- Iteration 1 -- +-- Iteration 3 -- int(-873121252) --- Iteration 1 -- +-- Iteration 4 -- int(1860518047) --- Iteration 1 -- +-- Iteration 5 -- int(269248583) --- Iteration 1 -- +-- Iteration 6 -- int(-834950157) --- Iteration 1 -- -int(-638440228) +-- Iteration 7 -- +int(-965354630) --- Iteration 1 -- -int(-742287383) +-- Iteration 8 -- +int(1376932222) --- Iteration 1 -- +-- Iteration 9 -- int(-2036403827) --- Iteration 1 -- +-- Iteration 10 -- Warning: crc32() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration 1 -- +-- Iteration 11 -- Warning: crc32() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration 1 -- +-- Iteration 12 -- Warning: crc32() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration 1 -- +-- Iteration 13 -- Warning: crc32() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration 1 -- +-- Iteration 14 -- Warning: crc32() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration 1 -- +-- Iteration 15 -- int(0) --- Iteration 1 -- +-- Iteration 16 -- int(0) --- Iteration 1 -- +-- Iteration 17 -- int(-2082672713) --- Iteration 1 -- +-- Iteration 18 -- int(0) --- Iteration 1 -- +-- Iteration 19 -- int(-2082672713) --- Iteration 1 -- +-- Iteration 20 -- int(0) --- Iteration 1 -- +-- Iteration 21 -- int(0) --- Iteration 1 -- +-- Iteration 22 -- int(0) --- Iteration 1 -- +-- Iteration 23 -- int(-1465013268) --- Iteration 1 -- +-- Iteration 24 -- int(0) --- Iteration 1 -- +-- Iteration 25 -- int(0) --- Iteration 1 -- +-- Iteration 26 -- Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strcspn_variation1.phpt b/ext/standard/tests/strings/strcspn_variation1.phpt index f80e4615e2..219a12c4bf 100644 --- a/ext/standard/tests/strings/strcspn_variation1.phpt +++ b/ext/standard/tests/strings/strcspn_variation1.phpt @@ -9,6 +9,7 @@ Test strcspn() function : usage variations - unexpected values for str argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); /* * Testing strspn() : with different unexpected values for str argument @@ -49,8 +50,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -90,7 +91,7 @@ $values = array( // loop through each element of the array for str foreach($values as $value) { - echo "\n-- Iteration with str value as \"$value\" \n"; + echo "\n-- Iteration with str value as \"$value\"\n"; var_dump( strcspn($value,$mask) ); // with default args var_dump( strcspn($value,$mask,$start) ); // with default len value var_dump( strcspn($value,$mask,$start,$len) ); // with all args @@ -104,56 +105,52 @@ echo "Done" --EXPECTF-- *** Testing strcspn() : 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 - --- Iteration with str value as "0" +-- Iteration with str value as "0" int(0) int(0) int(0) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(0) int(0) int(0) --- Iteration with str value as "12345" +-- Iteration with str value as "12345" int(0) int(0) int(0) --- Iteration with str value as "-2345" +-- Iteration with str value as "-2345" int(1) int(0) int(0) --- Iteration with str value as "10.5" +-- Iteration with str value as "10.5" int(0) int(0) int(0) --- Iteration with str value as "-10.5" +-- Iteration with str value as "-10.5" int(1) int(0) int(0) --- Iteration with str value as "105000000000" +-- Iteration with str value as "101234567000" int(0) int(0) int(0) --- Iteration with str value as "1.06E-9" +-- Iteration with str value as "1.07654321E-9" int(0) int(1) int(1) --- Iteration with str value as "0.5" +-- Iteration with str value as "0.5" int(0) int(1) int(1) --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -164,7 +161,7 @@ NULL Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -175,7 +172,7 @@ NULL Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -186,7 +183,7 @@ NULL Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -197,7 +194,7 @@ NULL Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -208,62 +205,62 @@ NULL Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(0) int(0) int(0) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(0) int(0) int(0) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "object" +-- Iteration with str value as "object" int(0) int(0) int(0) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "Resource id #%d" +-- Iteration with str value as "Resource id #%d" Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d NULL @@ -273,4 +270,4 @@ NULL Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strcspn_variation2.phpt b/ext/standard/tests/strings/strcspn_variation2.phpt index df79e9afd6..cb7544c2a9 100644 --- a/ext/standard/tests/strings/strcspn_variation2.phpt +++ b/ext/standard/tests/strings/strcspn_variation2.phpt @@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values for mask argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strcspn() : with different unexpected values for mask argument */ @@ -47,8 +49,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -88,7 +90,7 @@ $values = array( // loop through each element of the array for mask foreach($values as $value) { - echo "\n-- Iteration with mask value as \"$value\" -- \n"; + echo "\n-- Iteration with mask value as \"$value\" --\n"; var_dump( strcspn($str,$value) ); // with defalut args var_dump( strcspn($str,$value,$start) ); // with default len value var_dump( strcspn($str,$value,$start,$len) ); // with all args @@ -102,56 +104,52 @@ echo "Done" --EXPECTF-- *** Testing strcspn() : with diferent unexpected values of mask argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - --- Iteration with mask value as "0" -- +-- Iteration with mask value as "0" -- int(10) int(9) int(9) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(10) int(9) int(9) --- Iteration with mask value as "12345" -- +-- Iteration with mask value as "12345" -- int(10) int(9) int(9) --- Iteration with mask value as "-2345" -- +-- Iteration with mask value as "-2345" -- int(10) int(9) int(9) --- Iteration with mask value as "10.5" -- +-- Iteration with mask value as "10.5" -- int(10) int(9) int(9) --- Iteration with mask value as "-10.5" -- +-- Iteration with mask value as "-10.5" -- int(10) int(9) int(9) --- Iteration with mask value as "105000000000" -- +-- Iteration with mask value as "101234567000" -- int(10) int(9) int(9) --- Iteration with mask value as "1.06E-9" -- +-- Iteration with mask value as "1.07654321E-9" -- int(10) int(9) int(9) --- Iteration with mask value as "0.5" -- +-- Iteration with mask value as "0.5" -- int(10) int(9) int(9) --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -162,7 +160,7 @@ NULL Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -173,7 +171,7 @@ NULL Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -184,7 +182,7 @@ NULL Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -195,7 +193,7 @@ NULL Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -206,62 +204,62 @@ NULL Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "object" -- +-- Iteration with mask value as "object" -- int(1) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(10) int(9) int(9) --- Iteration with mask value as "Resource id #%d" -- +-- Iteration with mask value as "Resource id #%d" -- Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d NULL @@ -271,4 +269,4 @@ NULL Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strcspn_variation3.phpt b/ext/standard/tests/strings/strcspn_variation3.phpt index 869f46537c..f64cad3788 100644 --- a/ext/standard/tests/strings/strcspn_variation3.phpt +++ b/ext/standard/tests/strings/strcspn_variation3.phpt @@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of start argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strcspn() : with unexpected values of start argument */ @@ -41,8 +43,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -99,10 +101,6 @@ echo "Done" --EXPECTF-- *** Testing strcspn() : with unexpected values of start argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -- Iteration with start value as "10.5" -- int(0) int(0) @@ -111,11 +109,11 @@ int(0) int(0) int(0) --- Iteration with start value as "105000000000" -- -bool(false) -bool(false) +-- Iteration with start value as "101234567000" -- +int(0) +int(0) --- Iteration with start value as "1.06E-9" -- +-- Iteration with start value as "1.07654321E-9" -- int(0) int(0) @@ -125,7 +123,7 @@ int(0) -- Iteration with start value as "Array" -- -Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d +Warning: strcspn() expects parameter 3 to be long, array given in %s on line 89 NULL Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d @@ -242,4 +240,4 @@ NULL Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strcspn_variation4.phpt b/ext/standard/tests/strings/strcspn_variation4.phpt index 6ea48219cf..d456a23318 100644 --- a/ext/standard/tests/strings/strcspn_variation4.phpt +++ b/ext/standard/tests/strings/strcspn_variation4.phpt @@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of len argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strcspn() : with unexpected values of len argument */ @@ -41,8 +43,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -98,20 +100,16 @@ echo "Done" --EXPECTF-- *** Testing strcspn() : with unexpected values of len argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -- Iteration with len value as "10.5" -- int(0) -- Iteration with len value as "-10.5" -- int(0) --- Iteration with len value as "105000000000" -- +-- Iteration with len value as "101234567000" -- int(0) --- Iteration with len value as "1.06E-9" -- +-- Iteration with len value as "1.07654321E-9" -- int(0) -- Iteration with len value as "0.5" -- @@ -195,4 +193,4 @@ int(0) Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strspn_variation1.phpt b/ext/standard/tests/strings/strspn_variation1.phpt index 513046b62d..45e71edc28 100644 --- a/ext/standard/tests/strings/strspn_variation1.phpt +++ b/ext/standard/tests/strings/strspn_variation1.phpt @@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values for str argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strspn() : with different unexpected values for str argument */ @@ -48,8 +50,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -89,7 +91,7 @@ $values = array( // loop through each element of the array for str foreach($values as $value) { - echo "\n-- Iteration with str value as \"$value\" \n"; + echo "\n-- Iteration with str value as \"$value\"\n"; var_dump( strspn($value,$mask) ); // with default args var_dump( strspn($value,$mask,$start) ); // with default len value var_dump( strspn($value,$mask,$start,$len) ); // with all args @@ -103,56 +105,52 @@ echo "Done" --EXPECTF-- *** Testing strspn() : 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 - --- Iteration with str value as "0" +-- Iteration with str value as "0" int(1) int(0) int(0) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(1) int(0) int(0) --- Iteration with str value as "12345" +-- Iteration with str value as "12345" int(5) int(4) int(4) --- Iteration with str value as "-2345" +-- Iteration with str value as "-2345" int(0) int(4) int(4) --- Iteration with str value as "10.5" +-- Iteration with str value as "10.5" int(2) int(1) int(1) --- Iteration with str value as "-10.5" +-- Iteration with str value as "-10.5" int(0) int(2) int(2) --- Iteration with str value as "105000000000" +-- Iteration with str value as "101234567000" int(12) int(11) int(10) --- Iteration with str value as "1.06E-9" +-- Iteration with str value as "1.07654321E-9" int(1) int(0) int(0) --- Iteration with str value as "0.5" +-- Iteration with str value as "0.5" int(1) int(0) int(0) --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -163,7 +161,7 @@ NULL Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -174,7 +172,7 @@ NULL Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -185,7 +183,7 @@ NULL Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -196,7 +194,7 @@ NULL Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "Array" +-- Iteration with str value as "Array" Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL @@ -207,62 +205,62 @@ NULL Warning: strspn() expects parameter 1 to be string, array given in %s on line %d NULL --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(1) int(0) int(0) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "1" +-- Iteration with str value as "1" int(1) int(0) int(0) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "object" +-- Iteration with str value as "object" int(2) int(1) int(1) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "" +-- Iteration with str value as "" int(0) bool(false) bool(false) --- Iteration with str value as "Resource id #%d" +-- Iteration with str value as "Resource id #%d" Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d NULL @@ -272,4 +270,4 @@ NULL Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strspn_variation2.phpt b/ext/standard/tests/strings/strspn_variation2.phpt index b8891a5909..7af61e559a 100644 --- a/ext/standard/tests/strings/strspn_variation2.phpt +++ b/ext/standard/tests/strings/strspn_variation2.phpt @@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values for mask argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strspn() : with different unexpected values for mask argument */ @@ -47,8 +49,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -88,7 +90,7 @@ $values = array( // loop through each element of the array for mask foreach($values as $value) { - echo "\n-- Iteration with mask value as \"$value\" -- \n"; + echo "\n-- Iteration with mask value as \"$value\" --\n"; var_dump( strspn($str,$value) ); // with defalut args var_dump( strspn($str,$value,$start) ); // with default len value var_dump( strspn($str,$value,$start,$len) ); // with all args @@ -102,56 +104,52 @@ echo "Done" --EXPECTF-- *** Testing strspn() : with diferent unexpected values of mask argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - --- Iteration with mask value as "0" -- +-- Iteration with mask value as "0" -- int(0) int(0) int(0) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(0) int(0) int(0) --- Iteration with mask value as "12345" -- +-- Iteration with mask value as "12345" -- int(0) int(0) int(0) --- Iteration with mask value as "-2345" -- +-- Iteration with mask value as "-2345" -- int(0) int(0) int(0) --- Iteration with mask value as "10.5" -- +-- Iteration with mask value as "10.5" -- int(0) int(0) int(0) --- Iteration with mask value as "-10.5" -- +-- Iteration with mask value as "-10.5" -- int(0) int(0) int(0) --- Iteration with mask value as "105000000000" -- +-- Iteration with mask value as "101234567000" -- int(0) int(0) int(0) --- Iteration with mask value as "1.06E-9" -- +-- Iteration with mask value as "1.07654321E-9" -- int(0) int(0) int(0) --- Iteration with mask value as "0.5" -- +-- Iteration with mask value as "0.5" -- int(0) int(0) int(0) --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -162,7 +160,7 @@ NULL Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -173,7 +171,7 @@ NULL Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -184,7 +182,7 @@ NULL Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -195,7 +193,7 @@ NULL Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "Array" -- +-- Iteration with mask value as "Array" -- Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL @@ -206,62 +204,62 @@ NULL Warning: strspn() expects parameter 2 to be string, array given in %s on line %d NULL --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "1" -- +-- Iteration with mask value as "1" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "object" -- +-- Iteration with mask value as "object" -- int(0) int(1) int(1) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "" -- +-- Iteration with mask value as "" -- int(0) int(0) int(0) --- Iteration with mask value as "Resource id #%d" -- +-- Iteration with mask value as "Resource id #%d" -- Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d NULL @@ -271,4 +269,4 @@ NULL Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strspn_variation3.phpt b/ext/standard/tests/strings/strspn_variation3.phpt index 0773bd3ad3..3701cde187 100644 --- a/ext/standard/tests/strings/strspn_variation3.phpt +++ b/ext/standard/tests/strings/strspn_variation3.phpt @@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of start argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strspn() : with unexpected values of start argument */ @@ -41,8 +43,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -99,10 +101,6 @@ echo "Done" --EXPECTF-- *** Testing strspn() : with unexpected values of start argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -- Iteration with start value as "10.5" -- int(0) int(0) @@ -111,11 +109,11 @@ int(0) int(2) int(2) --- Iteration with start value as "105000000000" -- -bool(false) -bool(false) +-- Iteration with start value as "101234567000" -- +int(2) +int(2) --- Iteration with start value as "1.06E-9" -- +-- Iteration with start value as "1.07654321E-9" -- int(2) int(2) @@ -242,4 +240,4 @@ NULL Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strspn_variation4.phpt b/ext/standard/tests/strings/strspn_variation4.phpt index dd21a1d0fa..5bd3894414 100644 --- a/ext/standard/tests/strings/strspn_variation4.phpt +++ b/ext/standard/tests/strings/strspn_variation4.phpt @@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of len argument * Alias to functions: none */ +error_reporting(E_ALL & ~E_NOTICE); + /* * Testing strspn() : with unexpected values of len argument */ @@ -41,8 +43,8 @@ $values = array( // float data 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array data @@ -98,20 +100,16 @@ echo "Done" --EXPECTF-- *** Testing strspn() : with unexpected values of len argument *** -Notice: Undefined variable: undefined_var in %s on line %d - -Notice: Undefined variable: unset_var in %s on line %d - -- Iteration with len value as "10.5" -- int(2) -- Iteration with len value as "-10.5" -- int(0) --- Iteration with len value as "105000000000" -- -int(2) +-- Iteration with len value as "101234567000" -- +int(0) --- Iteration with len value as "1.06E-9" -- +-- Iteration with len value as "1.07654321E-9" -- int(0) -- Iteration with len value as "0.5" -- @@ -195,4 +193,4 @@ int(0) Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d NULL -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/strtok_variation1.phpt b/ext/standard/tests/strings/strtok_variation1.phpt index 3c754c88a6..c23b3873fa 100644 --- a/ext/standard/tests/strings/strtok_variation1.phpt +++ b/ext/standard/tests/strings/strtok_variation1.phpt @@ -41,8 +41,8 @@ $values = array ( // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -120,9 +120,9 @@ string(4) "10.5" -- Iteration 6 -- string(4) "10.5" -- Iteration 7 -- -string(12) "105000000000" +string(12) "101234567000" -- Iteration 8 -- -string(5) "1.06E" +string(11) "1.07654321E" -- Iteration 9 -- string(3) "0.5" -- Iteration 10 -- @@ -169,4 +169,4 @@ bool(false) bool(false) -- Iteration 26 -- string(%d) "Resource id #%d" -Done +Done \ No newline at end of file diff --git a/ext/standard/tests/strings/ucwords_variation1.phpt b/ext/standard/tests/strings/ucwords_variation1.phpt index 2a3ceeeb80..b7d61ab5da 100644 --- a/ext/standard/tests/strings/ucwords_variation1.phpt +++ b/ext/standard/tests/strings/ucwords_variation1.phpt @@ -49,8 +49,8 @@ $values = array ( // float values 10.5, -10.5, - 10.5e10, - 10.6E-10, + 10.1234567e10, + 10.7654321E-10, .5, // array values @@ -139,9 +139,9 @@ string(4) "10.5" -- Iteration 12 -- string(5) "-10.5" -- Iteration 13 -- -string(12) "105000000000" +string(12) "101234567000" -- Iteration 14 -- -string(7) "1.06E-9" +string(13) "1.07654321E-9" -- Iteration 15 -- string(3) "0.5" -- Iteration 16 -- @@ -162,7 +162,7 @@ Notice: Array to string conversion in %s on line %d string(5) "Array" -- Iteration 20 -- -Notice: Array to string conversion in %s on line %d +Notice: Array to string conversion in %s on line 101 string(5) "Array" -- Iteration 21 -- string(1) "1" @@ -196,4 +196,4 @@ string(0) "" string(0) "" -- Iteration 36 -- string(%d) "Resource Id #%d" -Done +Done \ No newline at end of file