From: Dmitry Stogov Date: Mon, 17 Dec 2007 10:02:13 +0000 (+0000) Subject: Fixed bug #42868 (Floats cast to integer produce unpredicatable results). (Zoe Slattery) X-Git-Tag: RELEASE_1_3_1~493 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b981769a3c030fb9feddb3cc8d888efe9d2c2e7;p=php Fixed bug #42868 (Floats cast to integer produce unpredicatable results). (Zoe Slattery) --- diff --git a/NEWS b/NEWS index 2770bfd459..9706a29393 100644 --- a/NEWS +++ b/NEWS @@ -68,6 +68,8 @@ PHP NEWS - Fixed bug #43128 (Very long class name causes segfault). (Dmitry) - Fixed bug #42952 (soap cache file is created with insecure permissions). (Dmitry) +- Fixed bug #42868 (Floats cast to integer produce unpredicatable results). + (Zoe Slattery) - Fixed bug #42848 (Status: header incorrect under FastCGI). (Dmitry) - Fixed bug #42773 (WSDL error causes HTTP 500 Response). (Dmitry) - Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines). (Nuno) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 0805ec7167..c177c3ec8f 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -183,20 +183,37 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) } \ } +#define MAX_UNSIGNED_INT ((double) LONG_MAX * 2) + 1 #ifdef _WIN64 # define DVAL_TO_LVAL(d, l) \ - if ((d) > LONG_MAX) { \ - (l) = (long)(unsigned long)(__int64) (d); \ - } else { \ - (l) = (long) (d); \ - } + if ((d) > LONG_MAX) { \ + if ((d) > MAX_UNSIGNED_INT) { \ + (l) = LONG_MAX; \ + } else { \ + (l) = (long)(unsigned long)(__int64) (d); \ + } \ + } else { \ + if((d) < LONG_MIN) { \ + (l) = LONG_MIN; \ + } else { \ + (l) = (long) (d); \ + } \ + } #else # define DVAL_TO_LVAL(d, l) \ - if ((d) > LONG_MAX) { \ - (l) = (unsigned long) (d); \ - } else { \ - (l) = (long) (d); \ - } + if ((d) > LONG_MAX) { \ + if ((d) > MAX_UNSIGNED_INT) { \ + (l) = LONG_MAX; \ + } else { \ + (l) = (unsigned long) (d); \ + } \ + } else { \ + if((d) < LONG_MIN) { \ + (l) = LONG_MIN; \ + } else { \ + (l) = (long) (d); \ + } \ + } #endif #define zendi_convert_to_long(op, holder, result) \ diff --git a/ext/standard/tests/array/array_fill_variation1.phpt b/ext/standard/tests/array/array_fill_variation1.phpt index 754847fc83..b5b70a3ef4 100644 --- a/ext/standard/tests/array/array_fill_variation1.phpt +++ b/ext/standard/tests/array/array_fill_variation1.phpt @@ -125,9 +125,9 @@ array(2) { } -- Iteration 3 -- array(2) { - [-1097262584]=> + [2147483647]=> int(100) - [0]=> + [-2147483648]=> int(100) } -- Iteration 4 -- @@ -146,23 +146,23 @@ array(2) { } -- Iteration 6 -- -Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d NULL -- Iteration 7 -- -Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d NULL -- Iteration 8 -- -Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d NULL -- Iteration 9 -- -Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d NULL -- Iteration 10 -- -Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d NULL -- Iteration 11 -- array(2) { @@ -208,23 +208,23 @@ array(2) { } -- Iteration 17 -- -Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d NULL -- Iteration 18 -- -Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d NULL -- Iteration 19 -- -Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d NULL -- Iteration 20 -- -Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d NULL -- Iteration 21 -- -Warning: array_fill() expects parameter 1 to be long, object given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, object given in %sarray_fill_variation1.php on line %d NULL -- Iteration 22 -- array(2) { @@ -242,6 +242,6 @@ array(2) { } -- Iteration 24 -- -Warning: array_fill() expects parameter 1 to be long, resource given in %s on line %d +Warning: array_fill() expects parameter 1 to be long, resource given in %sarray_fill_variation1.php on line %d NULL Done diff --git a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt index 8d14fd72c6..a4423a697f 100644 --- a/ext/standard/tests/general_functions/gettype_settype_variation2.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_variation2.phpt @@ -187,7 +187,7 @@ foreach ($types as $type) { echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- 8: Undefined variable: unset_var 8: Undefined variable: undef_var @@ -447,7 +447,7 @@ string(7) "integer" -- Iteration 51 -- string(6) "double" bool(true) -int(-508130303) +int(2147483647) string(7) "integer" -- Iteration 52 -- string(7) "integer" @@ -457,7 +457,7 @@ string(7) "integer" -- Iteration 53 -- string(6) "double" bool(true) -int(1952002105) +int(2147483647) string(7) "integer" -- Iteration 54 -- string(7) "integer" @@ -477,7 +477,7 @@ string(7) "integer" -- Iteration 57 -- string(6) "double" bool(true) -int(343000682) +int(2147483647) string(7) "integer" -- Iteration 58 -- string(6) "double" @@ -852,7 +852,7 @@ string(7) "integer" -- Iteration 51 -- string(6) "double" bool(true) -int(-508130303) +int(2147483647) string(7) "integer" -- Iteration 52 -- string(7) "integer" @@ -862,7 +862,7 @@ string(7) "integer" -- Iteration 53 -- string(6) "double" bool(true) -int(1952002105) +int(2147483647) string(7) "integer" -- Iteration 54 -- string(7) "integer" @@ -882,7 +882,7 @@ string(7) "integer" -- Iteration 57 -- string(6) "double" bool(true) -int(343000682) +int(2147483647) string(7) "integer" -- Iteration 58 -- string(6) "double" diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt index 924e6e21ff..3a038950a8 100644 --- a/ext/standard/tests/strings/chunk_split_variation2.phpt +++ b/ext/standard/tests/strings/chunk_split_variation2.phpt @@ -95,23 +95,21 @@ fclose($fp); string(28) "This is ch*uklen vari*ation*" -- Iteration 2 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 3 -- - -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d -bool(false) +string(26) "This is chuklen variation*" -- Iteration 4 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 5 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 6 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 7 -- string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" @@ -123,52 +121,52 @@ string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" -- Iteration 11 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 12 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 13 -- string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" -- Iteration 14 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 15 -- string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" -- Iteration 16 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 17 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 18 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 19 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 20 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 21 -- -Notice: Object of class MyClass could not be converted to int in %s on line %d +Notice: Object of class MyClass could not be converted to int in %schunk_split_variation2.php on line %d string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*" -- Iteration 22 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 23 -- -Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d +Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d bool(false) -- Iteration 24 -- -string(%d) "%s" -Done \ No newline at end of file +string(30) "This *is ch*uklen* vari*ation*" +Done diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt index 2ef7dd1bb8..9ac0621896 100644 --- a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt +++ b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt @@ -102,7 +102,7 @@ string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = string(104) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" -- Iteration 3 -- -string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" +string(94) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" -- Iteration 4 -- string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "" @@ -112,27 +112,27 @@ string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = -- Iteration 6 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 7 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 8 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 9 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 10 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, array given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 11 -- @@ -155,27 +155,27 @@ string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = -- Iteration 17 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 18 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 19 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 20 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, string given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 21 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, object given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, object given in %shtmlspecialchars_decode_variation2.php on line %d NULL -- Iteration 22 -- @@ -186,6 +186,6 @@ string(114) "Roy's height > Sam's height. 13 < 15. 1111 & 0000 = -- Iteration 24 -- -Warning: htmlspecialchars_decode() expects parameter 2 to be long, resource given in %s on line %d +Warning: htmlspecialchars_decode() expects parameter 2 to be long, resource given in %shtmlspecialchars_decode_variation2.php on line %d NULL Done diff --git a/ext/standard/tests/strings/pack.phpt b/ext/standard/tests/strings/pack.phpt index f64c24c96b..0c340478e3 100644 --- a/ext/standard/tests/strings/pack.phpt +++ b/ext/standard/tests/strings/pack.phpt @@ -145,7 +145,7 @@ Array ) Array ( - [1] => 0 + [1] => 2147483647 ) Array ( @@ -185,7 +185,7 @@ Array ) Array ( - [1] => 0 + [1] => 2147483647 ) Array ( @@ -233,7 +233,7 @@ Array ) Array ( - [1] => 0 + [1] => 2147483647 ) Array ( @@ -305,7 +305,7 @@ Array ) Array ( - [1] => 0 + [1] => 2147483647 ) Array ( diff --git a/ext/standard/tests/strings/sprintf_variation35.phpt b/ext/standard/tests/strings/sprintf_variation35.phpt index ca6ba891dd..6f80dca3fa 100644 --- a/ext/standard/tests/strings/sprintf_variation35.phpt +++ b/ext/standard/tests/strings/sprintf_variation35.phpt @@ -71,17 +71,17 @@ string(10) "0-9A-Fa-f]" string(1) "x" -- Iteration 2 -- -string(1) "1" -string(2) "1x" -string(1) "1" +string(8) "7fffffff" +string(9) "7fffffffx" +string(8) "7fffffff" string(1) "x" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" +string(9) " 7fffffff" +string(9) "7fffffff " +string(9) " 7fffffff" +string(9) " +7fffffff" +string(8) "7fffffff" +string(30) " 7fffffff" string(10) "0-9A-Fa-f]" string(1) "x" diff --git a/ext/standard/tests/strings/sprintf_variation4.phpt b/ext/standard/tests/strings/sprintf_variation4.phpt index 7fc66f910e..e0f8173acf 100644 --- a/ext/standard/tests/strings/sprintf_variation4.phpt +++ b/ext/standard/tests/strings/sprintf_variation4.phpt @@ -71,17 +71,17 @@ string(4) "0-9]" string(1) "d" -- Iteration 2 -- -string(1) "1" +string(10) "2147483647" string(1) "d" -string(1) "1" +string(10) "2147483647" string(1) "d" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" +string(11) " 2147483647" +string(11) "2147483647 " +string(11) " 2147483647" +string(11) " +2147483647" +string(10) "2147483647" +string(30) " 2147483647" string(4) "0-9]" string(1) "d" diff --git a/ext/standard/tests/strings/sprintf_variation41.phpt b/ext/standard/tests/strings/sprintf_variation41.phpt index 219ea0f025..f3a65a3bb8 100644 --- a/ext/standard/tests/strings/sprintf_variation41.phpt +++ b/ext/standard/tests/strings/sprintf_variation41.phpt @@ -75,17 +75,17 @@ string(4) "0-9]" string(1) "u" -- Iteration 2 -- -string(1) "1" +string(10) "2147483647" string(1) "u" -string(1) "1" +string(10) "2147483647" string(1) "u" -string(2) " 1" -string(2) "1 " -string(2) " 1" -string(2) " -1" -string(4) " 1" -string(30) " 1" +string(11) " 2147483647" +string(11) "2147483647 " +string(11) " 2147483647" +string(11) " +2147483647" +string(10) "2147483647" +string(30) " 2147483647" string(4) "0-9]" string(1) "u" diff --git a/ext/standard/tests/strings/str_split_variation2.phpt b/ext/standard/tests/strings/str_split_variation2.phpt index 376ee3b6d5..e11c3f0e79 100644 --- a/ext/standard/tests/strings/str_split_variation2.phpt +++ b/ext/standard/tests/strings/str_split_variation2.phpt @@ -107,47 +107,48 @@ array(3) { } --Iteration 2 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 3 -- - -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d -bool(false) +array(1) { + [0]=> + string(23) "variation2:split_length" +} --Iteration 4 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 5 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 6 -- -Warning: str_split() expects parameter 2 to be long, array given in %s on line %d +Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d NULL --Iteration 7 -- -Warning: str_split() expects parameter 2 to be long, array given in %s on line %d +Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d NULL --Iteration 8 -- -Warning: str_split() expects parameter 2 to be long, array given in %s on line %d +Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d NULL --Iteration 9 -- -Warning: str_split() expects parameter 2 to be long, array given in %s on line %d +Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d NULL --Iteration 10 -- -Warning: str_split() expects parameter 2 to be long, array given in %s on line %d +Warning: str_split() expects parameter 2 to be long, array given in %sstr_split_variation2.php on line %d NULL --Iteration 11 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 12 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 13 -- array(23) { @@ -200,7 +201,7 @@ array(23) { } --Iteration 14 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 15 -- array(23) { @@ -253,38 +254,38 @@ array(23) { } --Iteration 16 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 17 -- -Warning: str_split() expects parameter 2 to be long, string given in %s on line %d +Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d NULL --Iteration 18 -- -Warning: str_split() expects parameter 2 to be long, string given in %s on line %d +Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d NULL --Iteration 19 -- -Warning: str_split() expects parameter 2 to be long, string given in %s on line %d +Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d NULL --Iteration 20 -- -Warning: str_split() expects parameter 2 to be long, string given in %s on line %d +Warning: str_split() expects parameter 2 to be long, string given in %sstr_split_variation2.php on line %d NULL --Iteration 21 -- -Warning: str_split() expects parameter 2 to be long, object given in %s on line %d +Warning: str_split() expects parameter 2 to be long, object given in %sstr_split_variation2.php on line %d NULL --Iteration 22 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 23 -- -Warning: str_split(): The length of each segment must be greater than zero in %s on line %d +Warning: str_split(): The length of each segment must be greater than zero in %sstr_split_variation2.php on line %d bool(false) --Iteration 24 -- -Warning: str_split() expects parameter 2 to be long, resource given in %s on line %d +Warning: str_split() expects parameter 2 to be long, resource given in %sstr_split_variation2.php on line %d NULL Done diff --git a/ext/standard/tests/strings/vsprintf_variation15.phpt b/ext/standard/tests/strings/vsprintf_variation15.phpt index cedfe3f0ef..523e34ecd1 100644 --- a/ext/standard/tests/strings/vsprintf_variation15.phpt +++ b/ext/standard/tests/strings/vsprintf_variation15.phpt @@ -55,10 +55,10 @@ echo "Done"; string(16) "1234567 342391 0" -- Iteration 2 -- -string(23) "3755744308 u 1234 12345" +string(23) "2147483647 u 1234 12345" -- Iteration 3 -- -string(25) " 1234000 0 120" +string(25) " 1234000 2147483647 120" -- Iteration 4 -- string(10) "#1 0 $0 10" diff --git a/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt index 3af1738e56..8cc4316320 100644 --- a/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt +++ b/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt @@ -58,7 +58,7 @@ string(16) "1234567 342391 0" string(24) "12345678900 u 1234 12345" -- Iteration 3 -- -string(25) " 1234000 0 120" +string(34) " 1234000 9223372036854775807 120" -- Iteration 4 -- string(10) "#1 0 $0 10" diff --git a/ext/standard/tests/strings/vsprintf_variation16.phpt b/ext/standard/tests/strings/vsprintf_variation16.phpt index 01bcc662d5..8434aa5371 100644 --- a/ext/standard/tests/strings/vsprintf_variation16.phpt +++ b/ext/standard/tests/strings/vsprintf_variation16.phpt @@ -76,8 +76,8 @@ echo "Done"; -- Iteration 1 -- string(115) "2 0 10 - 123456 u 1234 2820130816 - 2840207360 1177509888 12345 + 123456 u 1234 2147483647 + 2147483647 2147483647 12345 12 4294967284 4294843840 _3 10 123456 2 0" diff --git a/ext/standard/tests/strings/vsprintf_variation4.phpt b/ext/standard/tests/strings/vsprintf_variation4.phpt index e3e6737b82..e72b8e898c 100644 --- a/ext/standard/tests/strings/vsprintf_variation4.phpt +++ b/ext/standard/tests/strings/vsprintf_variation4.phpt @@ -75,9 +75,9 @@ echo "Done"; *** Testing vsprintf() : int formats and non-integer values *** -- Iteration 1 -- -string(112) "2 +0 10 +string(111) "2 +0 10 123456 d -1234 1234 - -1474836480 200000 4000 22000000 + 2147483647 200000 4000 22000000 12345 12 -12 -123456 10 123456 2 0"