Fixed bug #42868 (Floats cast to integer droduce unpredicatable results). (Zoe Slattery)

This commit is contained in:
Dmitry Stogov 2007-12-17 11:06:43 +00:00
parent 432ed37817
commit 9c024a30a5
13 changed files with 210 additions and 201 deletions

View File

@ -240,20 +240,37 @@ ZEND_API int convert_scalar_to_number(zval *op TSRMLS_DC) /* {{{ */
/* }}} */
/* {{{ DVAL_TO_LVAL */
#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
/* }}} */

View File

@ -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,7 +242,7 @@ 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
--UEXPECTF--
@ -264,9 +264,9 @@ array(2) {
}
-- Iteration 3 --
array(2) {
[-1097262584]=>
[2147483647]=>
int(100)
[0]=>
[-2147483648]=>
int(100)
}
-- Iteration 4 --
@ -285,23 +285,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) {
@ -347,23 +347,23 @@ array(2) {
}
-- Iteration 17 --
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %s on line %d
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %sarray_fill_variation1.php on line %d
NULL
-- Iteration 18 --
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %s on line %d
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %sarray_fill_variation1.php on line %d
NULL
-- Iteration 19 --
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %s on line %d
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %sarray_fill_variation1.php on line %d
NULL
-- Iteration 20 --
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %s on line %d
Warning: array_fill() expects parameter 1 to be long, Unicode 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) {
@ -381,6 +381,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

View File

@ -460,7 +460,7 @@ string(7) "integer"
-- Iteration 51 --
string(6) "double"
bool(true)
int(-508130303)
int(2147483647)
string(7) "integer"
-- Iteration 52 --
string(7) "integer"
@ -470,7 +470,7 @@ string(7) "integer"
-- Iteration 53 --
string(6) "double"
bool(true)
int(1952002105)
int(2147483647)
string(7) "integer"
-- Iteration 54 --
string(7) "integer"
@ -490,7 +490,7 @@ string(7) "integer"
-- Iteration 57 --
string(6) "double"
bool(true)
int(343000682)
int(2147483647)
string(7) "integer"
-- Iteration 58 --
string(6) "double"
@ -920,7 +920,7 @@ string(7) "integer"
-- Iteration 51 --
string(6) "double"
bool(true)
int(-508130303)
int(2147483647)
string(7) "integer"
-- Iteration 52 --
string(7) "integer"
@ -930,7 +930,7 @@ string(7) "integer"
-- Iteration 53 --
string(6) "double"
bool(true)
int(1952002105)
int(2147483647)
string(7) "integer"
-- Iteration 54 --
string(7) "integer"
@ -950,7 +950,7 @@ string(7) "integer"
-- Iteration 57 --
string(6) "double"
bool(true)
int(343000682)
int(2147483647)
string(7) "integer"
-- Iteration 58 --
string(6) "double"
@ -1386,7 +1386,7 @@ unicode(7) "integer"
-- Iteration 51 --
unicode(6) "double"
bool(true)
int(-508130303)
int(2147483647)
unicode(7) "integer"
-- Iteration 52 --
unicode(7) "integer"
@ -1396,7 +1396,7 @@ unicode(7) "integer"
-- Iteration 53 --
unicode(6) "double"
bool(true)
int(1952002105)
int(2147483647)
unicode(7) "integer"
-- Iteration 54 --
unicode(7) "integer"
@ -1416,7 +1416,7 @@ unicode(7) "integer"
-- Iteration 57 --
unicode(6) "double"
bool(true)
int(343000682)
int(2147483647)
unicode(7) "integer"
-- Iteration 58 --
unicode(6) "double"
@ -1846,7 +1846,7 @@ unicode(7) "integer"
-- Iteration 51 --
unicode(6) "double"
bool(true)
int(-508130303)
int(2147483647)
unicode(7) "integer"
-- Iteration 52 --
unicode(7) "integer"
@ -1856,7 +1856,7 @@ unicode(7) "integer"
-- Iteration 53 --
unicode(6) "double"
bool(true)
int(1952002105)
int(2147483647)
unicode(7) "integer"
-- Iteration 54 --
unicode(7) "integer"
@ -1876,7 +1876,7 @@ unicode(7) "integer"
-- Iteration 57 --
unicode(6) "double"
bool(true)
int(343000682)
int(2147483647)
unicode(7) "integer"
-- Iteration 58 --
unicode(6) "double"

View File

@ -95,91 +95,89 @@ 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() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 7 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 8 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 9 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 10 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- 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() expects parameter 2 to be long, string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 18 --
Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 19 --
Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 20 --
Warning: chunk_split() expects parameter 2 to be long, string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 21 --
Warning: chunk_split() expects parameter 2 to be long, object given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, object given in %schunk_split_variation2.php on line %d
NULL
-- 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 --
Warning: chunk_split() expects parameter 2 to be long, resource given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, resource given in %schunk_split_variation2.php on line %d
NULL
Done
--UEXPECTF--
@ -188,90 +186,88 @@ Done
unicode(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)
unicode(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() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 7 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 8 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 9 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 10 --
Warning: chunk_split() expects parameter 2 to be long, array given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, array given in %schunk_split_variation2.php on line %d
NULL
-- 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 --
unicode(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 --
unicode(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() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 18 --
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 19 --
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 20 --
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, Unicode string given in %schunk_split_variation2.php on line %d
NULL
-- Iteration 21 --
Warning: chunk_split() expects parameter 2 to be long, object given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, object given in %schunk_split_variation2.php on line %d
NULL
-- 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 --
Warning: chunk_split() expects parameter 2 to be long, resource given in %s on line %d
Warning: chunk_split() expects parameter 2 to be long, resource given in %schunk_split_variation2.php on line %d
NULL
Done

View File

@ -102,7 +102,7 @@ string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 =
string(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-- Iteration 3 --
string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
string(94) "<html>Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-- Iteration 4 --
string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
@ -112,27 +112,27 @@ string(114) "<html>Roy&#039;s height > Sam&#039;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) "<html>Roy&#039;s height > Sam&#039;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,7 +186,7 @@ string(114) "<html>Roy&#039;s height > Sam&#039;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
--UEXPECTF--
@ -199,7 +199,7 @@ unicode(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000
unicode(104) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-- Iteration 3 --
unicode(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
unicode(94) "<html>Roy's height > Sam's height. 13 < 15. 1111 & 0000 = 0000. " double quote string "</html>"
-- Iteration 4 --
unicode(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"
@ -209,27 +209,27 @@ unicode(114) "<html>Roy&#039;s height > Sam&#039;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 --
@ -252,27 +252,27 @@ unicode(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000
-- Iteration 17 --
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 18 --
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 19 --
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %shtmlspecialchars_decode_variation2.php on line %d
NULL
-- Iteration 20 --
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode string given in %s on line %d
Warning: htmlspecialchars_decode() expects parameter 2 to be long, Unicode 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 --
@ -283,6 +283,7 @@ unicode(114) "<html>Roy&#039;s height > Sam&#039;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

View File

@ -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
(

View File

@ -65,17 +65,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"
@ -229,7 +229,6 @@ string(30) " 100590"
string(10) "0-9A-Fa-f]"
string(1) "x"
Done
--UEXPECTF--
*** Testing sprintf() : hexa formats with float values ***
@ -249,17 +248,17 @@ unicode(10) "0-9A-Fa-f]"
unicode(1) "x"
-- Iteration 2 --
unicode(1) "1"
unicode(2) "1x"
unicode(1) "1"
unicode(8) "7fffffff"
unicode(9) "7fffffffx"
unicode(8) "7fffffff"
unicode(1) "x"
unicode(2) " 1"
unicode(2) "1 "
unicode(2) " 1"
unicode(2) "
1"
unicode(4) " 1"
unicode(30) " 1"
unicode(9) " 7fffffff"
unicode(9) "7fffffff "
unicode(9) " 7fffffff"
unicode(9) "
7fffffff"
unicode(8) "7fffffff"
unicode(30) " 7fffffff"
unicode(10) "0-9A-Fa-f]"
unicode(1) "x"
@ -412,4 +411,4 @@ unicode(6) "100590"
unicode(30) " 100590"
unicode(10) "0-9A-Fa-f]"
unicode(1) "x"
Done
Done

View File

@ -65,17 +65,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"
@ -229,7 +229,6 @@ string(30) " 1050000"
string(4) "0-9]"
string(1) "d"
Done
--UEXPECTF--
*** Testing sprintf() : integer formats with float values ***
@ -249,17 +248,17 @@ unicode(4) "0-9]"
unicode(1) "d"
-- Iteration 2 --
unicode(1) "1"
unicode(10) "2147483647"
unicode(1) "d"
unicode(1) "1"
unicode(10) "2147483647"
unicode(1) "d"
unicode(2) " 1"
unicode(2) "1 "
unicode(2) " 1"
unicode(2) "
1"
unicode(4) " 1"
unicode(30) " 1"
unicode(11) " 2147483647"
unicode(11) "2147483647 "
unicode(11) " 2147483647"
unicode(11) "
2147483647"
unicode(10) "2147483647"
unicode(30) " 2147483647"
unicode(4) "0-9]"
unicode(1) "d"
@ -412,4 +411,4 @@ unicode(7) "1050000"
unicode(30) " 1050000"
unicode(4) "0-9]"
unicode(1) "d"
Done
Done

View File

@ -69,17 +69,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"
@ -308,7 +308,6 @@ string(30) " 1050000"
string(4) "0-9]"
string(1) "u"
Done
--UEXPECTF--
*** Testing sprintf() : unsigned formats with float values ***
@ -328,17 +327,17 @@ unicode(4) "0-9]"
unicode(1) "u"
-- Iteration 2 --
unicode(1) "1"
unicode(10) "2147483647"
unicode(1) "u"
unicode(1) "1"
unicode(10) "2147483647"
unicode(1) "u"
unicode(2) " 1"
unicode(2) "1 "
unicode(2) " 1"
unicode(2) "
1"
unicode(4) " 1"
unicode(30) " 1"
unicode(11) " 2147483647"
unicode(11) "2147483647 "
unicode(11) " 2147483647"
unicode(11) "
2147483647"
unicode(10) "2147483647"
unicode(30) " 2147483647"
unicode(4) "0-9]"
unicode(1) "u"
@ -566,4 +565,4 @@ unicode(7) "1050000"
unicode(30) " 1050000"
unicode(4) "0-9]"
unicode(1) "u"
Done
Done

View File

@ -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"
@ -66,7 +66,6 @@ string(10) "#1 0 $0 10"
-- Iteration 5 --
string(7) "1 2 3 4"
Done
--UEXPECTF--
*** Testing vsprintf() : unsigned formats and unsigned values ***
@ -74,10 +73,10 @@ Done
unicode(16) "1234567 342391 0"
-- Iteration 2 --
unicode(23) "3755744308 u 1234 12345"
unicode(23) "2147483647 u 1234 12345"
-- Iteration 3 --
unicode(25) " 1234000 0 120"
unicode(25) " 1234000 2147483647 120"
-- Iteration 4 --
unicode(10) "#1 0 $0 10"

View File

@ -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"
@ -76,7 +76,7 @@ unicode(16) "1234567 342391 0"
unicode(24) "12345678900 u 1234 12345"
-- Iteration 3 --
unicode(25) " 1234000 0 120"
unicode(34) " 1234000 9223372036854775807 120"
-- Iteration 4 --
unicode(10) "#1 0 $0 10"

View File

@ -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"
@ -102,14 +102,13 @@ string(76) "1 1 0
#0 1 $1 _0
0 1 1 1"
Done
--UEXPECTF--
*** Testing vsprintf() : unsigned formats and signed & other types of values ***
-- Iteration 1 --
unicode(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"

View File

@ -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"
@ -102,14 +102,13 @@ string(81) "1 +1 0
#0 1 $1 _0
0 1 1 1"
Done
--UEXPECTF--
*** Testing vsprintf() : int formats and non-integer values ***
-- Iteration 1 --
unicode(112) "2 +0 10
unicode(111) "2 +0 10
123456 d -1234 1234
-1474836480 200000 4000 22000000
2147483647 200000 4000 22000000
12345 12 -12 -123456
10 123456 2 0"
@ -134,3 +133,4 @@ unicode(81) "1 +1 0
#0 1 $1 _0
0 1 1 1"
Done