]> granicus.if.org Git - php/commitdiff
Fixed bug #42868 (Floats cast to integer droduce unpredicatable results). (Zoe Slattery)
authorDmitry Stogov <dmitry@php.net>
Mon, 17 Dec 2007 11:06:43 +0000 (11:06 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 17 Dec 2007 11:06:43 +0000 (11:06 +0000)
13 files changed:
Zend/zend_operators.c
ext/standard/tests/array/array_fill_variation1.phpt
ext/standard/tests/general_functions/gettype_settype_variation2.phpt
ext/standard/tests/strings/chunk_split_variation2.phpt
ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
ext/standard/tests/strings/pack.phpt
ext/standard/tests/strings/sprintf_variation35.phpt
ext/standard/tests/strings/sprintf_variation4.phpt
ext/standard/tests/strings/sprintf_variation41.phpt
ext/standard/tests/strings/vsprintf_variation15.phpt
ext/standard/tests/strings/vsprintf_variation15_64bit.phpt
ext/standard/tests/strings/vsprintf_variation16.phpt
ext/standard/tests/strings/vsprintf_variation4.phpt

index dec7e62e10e14e90ffaf9b97daef7382a1933daf..6f22c20165365b819e04819e882686922e47e9c2 100644 (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
 /* }}} */
 
index afe4cf113ee8546d873d00f92774939b8a33eb9d..620a8850caa224051d9ef51285df58f0c5aab938 100644 (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
index 6c321de491edbcf265da9489962d5b1ac2195ed2..ae982d392844d210dd7ccbc023f392105c4430fc 100644 (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"
index 6da128dba6cae90cca0c844d59199c2b6bf2a3a8..a827415b34c37387e3d198f66d45cd981f441b58 100644 (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
index 5a7432c6fa8549b17eb1690e76fe0b4d056b74ed..052f9a8a590bdfa62c800e007353840fc679f0e0 100644 (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
+
index b36eee1e5703b7c3486862326b82a1a5a168cb0e..886519945f281891a7a0e36794da7d2b93943b4f 100644 (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
 (
index 3680a4a9caea9a582f267da5f90dfd142e62b397..ad2df17f55a563882b4f79116ea104b83a6d3b5d 100644 (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
\ No newline at end of file
+Done
index 8cb0690a7eeedfb085c136d7bbb78810b1368f1d..51bb6a84ef9d7951c98cd2c49f5ff6d6bae0c7f7 100644 (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
\ No newline at end of file
+Done
index 7aabfb0910e926017bf612bae87c5e7d7f07750a..3729b866c6da6fc9c8dc1d78d6c5cd5562a88b88 100644 (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
\ No newline at end of file
+Done
index 01dac33eeac6d1d3a050744568e06240138d517a..dfb475e53af98140cf316132fc33cd9d8fef18f2 100644 (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"
index 103599213eae81bc23fd49562cad40d1db999e75..e10d1a46816e15da1f738f34af41e8cc0ed68c26 100644 (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"
index 4bee1341df6a7c0c785b331efe11ebf801cecf60..577ceea135f5590ee2413da74bbe26fbf8513f3c 100644 (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"
 
index 37c9c606e9cde6defb4cedf91ca12f92cb8b269f..b374d0572a750e7c5994ab7085a73713e38aa49d 100644 (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
+