summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.c32
-rw-r--r--Zend/zend_API.h27
-rw-r--r--ext/date/tests/bug36988.phpt7
-rw-r--r--ext/date/tests/bug52062.phpt12
-rw-r--r--ext/date/tests/date_sunrise_variation2.phpt6
-rw-r--r--ext/date/tests/date_sunrise_variation9.phpt40
-rw-r--r--ext/date/tests/date_sunset_variation2.phpt8
-rw-r--r--ext/date/tests/date_sunset_variation9.phpt38
-rw-r--r--ext/date/tests/getdate_variation7.phpt65
-rw-r--r--ext/date/tests/gmdate_variation14.phpt18
-rw-r--r--ext/date/tests/gmstrftime_variation2.phpt8
-rw-r--r--ext/date/tests/idate_variation3.phpt20
-rw-r--r--ext/date/tests/localtime_variation3.phpt104
-rw-r--r--ext/date/tests/strftime_variation23.phpt20
-rw-r--r--ext/standard/tests/strings/bug54322.phpt5
-rw-r--r--ext/standard/tests/strings/chunk_split_variation5.phptbin2289 -> 2285 bytes
-rw-r--r--ext/standard/tests/strings/chunk_split_variation8.phpt4
-rw-r--r--ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt4
18 files changed, 193 insertions, 225 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 3643bfc8e2..5d71383860 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -404,14 +404,16 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
if ((type = is_numeric_string(Z_STRVAL_P(arg), Z_STRLEN_P(arg), p, &d, -1)) == 0) {
return "long";
} else if (type == IS_DOUBLE) {
- if (c == 'L') {
- if (d > ZEND_LONG_MAX) {
- *p = ZEND_LONG_MAX;
- break;
- } else if (d < ZEND_LONG_MIN) {
- *p = ZEND_LONG_MIN;
- break;
+ if (zend_isnan(d)) {
+ return "long";
+ }
+ if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
+ if (c == 'L') {
+ *p = (d > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
+ } else {
+ return "long";
}
+ break;
}
*p = zend_dval_to_lval(d);
@@ -420,14 +422,16 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
break;
case IS_DOUBLE:
- if (c == 'L') {
- if (Z_DVAL_P(arg) > ZEND_LONG_MAX) {
- *p = ZEND_LONG_MAX;
- break;
- } else if (Z_DVAL_P(arg) < ZEND_LONG_MIN) {
- *p = ZEND_LONG_MIN;
- break;
+ if (zend_isnan(Z_DVAL_P(arg))) {
+ return "long";
+ }
+ if (Z_DVAL_P(arg) > ZEND_LONG_MAX || Z_DVAL_P(arg) < ZEND_LONG_MIN) {
+ if (c == 'L') {
+ *p = (Z_DVAL_P(arg) > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
+ } else {
+ return "long";
}
+ break;
}
case IS_NULL:
case IS_FALSE:
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 46e284be7f..371d1d8ae8 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -1064,10 +1064,16 @@ static zend_always_inline int _z_param_long(zval *arg, zend_long *dest, zend_boo
if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) {
*dest = Z_LVAL_P(arg);
} else if (EXPECTED(Z_TYPE_P(arg) == IS_DOUBLE)) {
- if (strict && UNEXPECTED(Z_DVAL_P(arg) > ZEND_LONG_MAX)) {
- *dest = ZEND_LONG_MAX;
- } else if (strict && UNEXPECTED(Z_DVAL_P(arg) < ZEND_LONG_MIN)) {
- *dest = ZEND_LONG_MIN;
+ if (UNEXPECTED(zend_isnan(Z_DVAL_P(arg)))) {
+ return 0;
+ }
+ if (UNEXPECTED(Z_DVAL_P(arg) > ZEND_LONG_MAX || Z_DVAL_P(arg) < ZEND_LONG_MIN)) {
+ /* Ironically, the strict parameter makes zpp *non*-strict here */
+ if (strict) {
+ *dest = (Z_DVAL_P(arg) > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
+ } else {
+ return 0;
+ }
} else {
*dest = zend_dval_to_lval(Z_DVAL_P(arg));
}
@@ -1077,10 +1083,15 @@ static zend_always_inline int _z_param_long(zval *arg, zend_long *dest, zend_boo
if (UNEXPECTED((type = is_numeric_str_function(Z_STR_P(arg), dest, &d)) != IS_LONG)) {
if (EXPECTED(type != 0)) {
- if (strict && UNEXPECTED(d > ZEND_LONG_MAX)) {
- *dest = ZEND_LONG_MAX;
- } else if (strict && UNEXPECTED(d < ZEND_LONG_MIN)) {
- *dest = ZEND_LONG_MIN;
+ if (UNEXPECTED(zend_isnan(Z_DVAL_P(arg)))) {
+ return 0;
+ }
+ if (UNEXPECTED(d > ZEND_LONG_MAX || d < ZEND_LONG_MIN)) {
+ if (strict) {
+ *dest = (d > 0) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
+ } else {
+ return 0;
+ }
} else {
*dest = zend_dval_to_lval(d);
}
diff --git a/ext/date/tests/bug36988.phpt b/ext/date/tests/bug36988.phpt
index c37d1fb768..5fcacd6737 100644
--- a/ext/date/tests/bug36988.phpt
+++ b/ext/date/tests/bug36988.phpt
@@ -1,11 +1,12 @@
--TEST--
Bug #36988 (mktime freezes on long numbers)
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
date_default_timezone_set('GMT');
$start = microtime(true);
$a = mktime(1, 1, 1, 1, 1, 11111111111);
-echo (microtime(true) - $start) < 1 ? "smaller than one second" : "more than a second";
?>
---EXPECT--
-smaller than one second
+--EXPECTF--
+Warning: mktime() expects parameter 6 to be long, double given in %s on line %d
diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt
index 81e767b0f0..9d35a2942f 100644
--- a/ext/date/tests/bug52062.phpt
+++ b/ext/date/tests/bug52062.phpt
@@ -2,7 +2,7 @@
Bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp) (32 bit)
--SKIPIF--
<?php
-if (PHP_INT_SIZE == 8) die('skip 32-bit only');
+if (PHP_INT_SIZE != 4) die('skip 32-bit only');
?>
--INI--
date.timezone=UTC
@@ -20,10 +20,12 @@ var_dump($d->getTimestamp());
$i = new DateInterval('PT100000000000S');
var_dump($i->format('%s'));
?>
---EXPECT--
+--EXPECTF--
string(32) "5138-11-16 09:46:40 100000000000"
bool(false)
string(12) "100000000000"
-string(30) "2008-07-11 04:56:32 1215752192"
-int(1215752192)
-string(10) "1215752192"
+
+Warning: DateTime::setTimestamp() expects parameter 1 to be long, double given in %s on line %d
+string(32) "5138-11-16 09:46:40 100000000000"
+bool(false)
+string(10) "1215752192" \ No newline at end of file
diff --git a/ext/date/tests/date_sunrise_variation2.phpt b/ext/date/tests/date_sunrise_variation2.phpt
index b613b35f96..6af0fbd84e 100644
--- a/ext/date/tests/date_sunrise_variation2.phpt
+++ b/ext/date/tests/date_sunrise_variation2.phpt
@@ -1,5 +1,7 @@
--TEST--
Test date_sunrise() function : usage variation - Passing unexpected values to second argument format.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
@@ -114,12 +116,12 @@ bool(false)
--float 12.3456789000e10--
-Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
+Warning: date_sunrise() expects parameter 2 to be long, double given in %s on line %d
bool(false)
--float -12.3456789000e10--
-Warning: date_sunrise(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
+Warning: date_sunrise() expects parameter 2 to be long, double given in %s on line %d
bool(false)
--float .5--
diff --git a/ext/date/tests/date_sunrise_variation9.phpt b/ext/date/tests/date_sunrise_variation9.phpt
index 49af06d524..f85032620b 100644
--- a/ext/date/tests/date_sunrise_variation9.phpt
+++ b/ext/date/tests/date_sunrise_variation9.phpt
@@ -1,5 +1,7 @@
--TEST--
Test date_sunrise() function : usage variation - Passing high positive and negative float values to time argument.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
@@ -32,16 +34,28 @@ var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $ze
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing date_sunrise\(\) : usage variation \*\*\*
-
--- Testing date_sunrise\(\) function by passing float 12.3456789000e10 value to time --
-string\(5\) "(07:34|07:49)"
-float\((7.566[0-9]*|7.821[0-9]*)\)
-int\((-1097256359|123456811756)\)
-
--- Testing date_sunrise\(\) function by passing float -12.3456789000e10 value to time --
-string\(5\) "(07:42|08:48|08:04)"
-float\((7.713[0-9]*|8.810[0-9]*|8.074[0-9]*)\)
-int\((1097304168|-2147443882|-123456761731)\)
-===DONE===
+--EXPECTF--
+*** Testing date_sunrise() : usage variation ***
+
+-- Testing date_sunrise() function by passing float 12.3456789000e10 value to time --
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing date_sunrise() function by passing float -12.3456789000e10 value to time --
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunrise() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/date_sunset_variation2.phpt b/ext/date/tests/date_sunset_variation2.phpt
index 575b64a22c..50f6a00164 100644
--- a/ext/date/tests/date_sunset_variation2.phpt
+++ b/ext/date/tests/date_sunset_variation2.phpt
@@ -1,5 +1,7 @@
--TEST--
Test date_sunset() function : usage variation - Passing unexpected values to second argument format.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
@@ -114,12 +116,12 @@ bool(false)
--float 12.3456789000e10--
-Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
+Warning: date_sunset() expects parameter 2 to be long, double given in %s on line %d
bool(false)
--float -12.3456789000e10--
-Warning: date_sunset(): Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on line %d
+Warning: date_sunset() expects parameter 2 to be long, double given in %s on line %d
bool(false)
--float .5--
@@ -208,4 +210,4 @@ int(1218199253)
--unset var--
int(1218199253)
-===DONE===
+===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/date_sunset_variation9.phpt b/ext/date/tests/date_sunset_variation9.phpt
index 59a4b584a5..db0f6e25ed 100644
--- a/ext/date/tests/date_sunset_variation9.phpt
+++ b/ext/date/tests/date_sunset_variation9.phpt
@@ -1,5 +1,7 @@
--TEST--
Test date_sunset() function : usage variation - Passing high positive and negative float values to time argument.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
@@ -32,16 +34,28 @@ var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zen
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing date_sunset\(\) : usage variation \*\*\*
-
--- Testing date_sunset\(\) function by passing float 12.3456789000e10 value to time --
-string\(5\) "(19:49|19:28)"
-float\((19.830[0-9]*|19.830[0-9]*|19.480[0-9]*)\)
-int\((-1097212211|123456853728)\)
-
--- Testing date_sunset\(\) function by passing float -12.3456789000e10 value to time --
-string\(5\) "(19:03|18:12|18:48)"
-float\((19.056[0-9]*|18.213[0-9]*|18.808[0-9]*)\)
-int\((1097345002|-2147410031|-123456723090)\)
+--EXPECTF--
+*** Testing date_sunset() : usage variation ***
+
+-- Testing date_sunset() function by passing float 12.3456789000e10 value to time --
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing date_sunset() function by passing float -12.3456789000e10 value to time --
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
===DONE===
diff --git a/ext/date/tests/getdate_variation7.phpt b/ext/date/tests/getdate_variation7.phpt
index 5af2dd53fc..44f3762ff9 100644
--- a/ext/date/tests/getdate_variation7.phpt
+++ b/ext/date/tests/getdate_variation7.phpt
@@ -1,5 +1,7 @@
--TEST--
Test getdate() function : usage variation - Passing high positive and negative float values to timestamp.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : array getdate([int timestamp])
@@ -20,59 +22,16 @@ $timestamp = -12.3456789000e10;
var_dump( getdate($timestamp) );
?>
===DONE===
---EXPECTREGEX--
+--EXPECTF--
+*** Testing getdate() : usage variation ***
-\*\*\* Testing getdate\(\) : usage variation \*\*\*
+-- Testing getdate() function by passing float 12.3456789000e10 value to timestamp --
--- Testing getdate\(\) function by passing float 12.3456789000e10 value to timestamp --
-array\(11\) {
- \["seconds"\]=>
- int\((36|0)\)
- \["minutes"\]=>
- int\((43|0)\)
- \["hours"\]=>
- int\((10|6)\)
- \["mday"\]=>
- int\((26|11)\)
- \["wday"\]=>
- int\((2|6)\)
- \["mon"\]=>
- int\(3\)
- \["year"\]=>
- int\((1935|5882)\)
- \["yday"\]=>
- int\((84|69)\)
- \["weekday"\]=>
- string\((7|8)\) "(Tuesday|Saturday)"
- \["month"\]=>
- string\(5\) "March"
- \[0\]=>
- int\((-1097262584|123456789000)\)
-}
+Warning: getdate() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
--- Testing getdate\(\) function by passing float -12.3456789000e10 value to timestamp --
-array\(11\) {
- \["seconds"\]=>
- int\((44|12|20)\)
- \["minutes"\]=>
- int\((39|23)\)
- \["hours"\]=>
- int\((0|2|5)\)
- \["mday"\]=>
- int\((9|14|23)\)
- \["wday"\]=>
- int\((6|-4)\)
- \["mon"\]=>
- int\((10|12)\)
- \["year"\]=>
- int\((2004|1901|-1943)\)
- \["yday"\]=>
- int\((282|347|295)\)
- \["weekday"\]=>
- string\((8|7)\) "(Saturday|Unknown)"
- \["month"\]=>
- string\((7|8)\) "(October|December)"
- \[0\]=>
- int\((1097262584|-2147483648|-123456789000)\)
-}
-===DONE===
+-- Testing getdate() function by passing float -12.3456789000e10 value to timestamp --
+
+Warning: getdate() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/gmdate_variation14.phpt b/ext/date/tests/gmdate_variation14.phpt
index 5b62a8274d..099af0d732 100644
--- a/ext/date/tests/gmdate_variation14.phpt
+++ b/ext/date/tests/gmdate_variation14.phpt
@@ -1,5 +1,7 @@
--TEST--
Test gmdate() function : usage variation - Passing high positive and negetive float values to timestamp.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : string gmdate(string format [, long timestamp])
@@ -23,12 +25,16 @@ var_dump( gmdate($format, $timestamp) );
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing gmdate\(\) : usage variation \*\*\*
+--EXPECTF--
+*** Testing gmdate() : usage variation ***
--- Testing gmdate\(\) function with float 12.3456789000e10 to timestamp --
-string\((24|25)\) "(1935-03-26T04:50:16\+0000|5882-03-11T00:30:00\+0000)"
+-- Testing gmdate() function with float 12.3456789000e10 to timestamp --
--- Testing gmdate\(\) function with float -12.3456789000e10 to timestamp --
-string\((24|25)\) "(2004-10-08T19:09:44\+0000|1901-12-13T20:45:52\+0000|-1943-10-22T23:30:00\+0000)"
+Warning: gmdate() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing gmdate() function with float -12.3456789000e10 to timestamp --
+
+Warning: gmdate() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/gmstrftime_variation2.phpt b/ext/date/tests/gmstrftime_variation2.phpt
index c577fe1d3d..c591dc3b16 100644
--- a/ext/date/tests/gmstrftime_variation2.phpt
+++ b/ext/date/tests/gmstrftime_variation2.phpt
@@ -112,10 +112,14 @@ string(20) "Jan 01 1970 00:00:10"
string(20) "Dec 31 1969 23:59:50"
--float 12.3456789000e10--
-string(20) "Mar 26 1935 04:50:16"
+
+Warning: gmstrftime() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
--float -12.3456789000e10--
-string(20) "Oct 08 2004 19:09:44"
+
+Warning: gmstrftime() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
--float .5--
string(20) "Jan 01 1970 00:00:00"
diff --git a/ext/date/tests/idate_variation3.phpt b/ext/date/tests/idate_variation3.phpt
index 1a2ee1ffd5..fbbfa5ee1e 100644
--- a/ext/date/tests/idate_variation3.phpt
+++ b/ext/date/tests/idate_variation3.phpt
@@ -1,5 +1,7 @@
--TEST--
Test idate() function : usage variation - Passing higher positive and negetive float values to timestamp.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : int idate(string format [, int timestamp])
@@ -24,12 +26,16 @@ var_dump( idate($format, $timestamp) );
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing idate\(\) : usage variation \*\*\*
+--EXPECTF--
+*** Testing idate() : usage variation ***
--- Testing idate\(\) function with float 12.3456789000e10 to timestamp --
-int\((1935|5882)\)
+-- Testing idate() function with float 12.3456789000e10 to timestamp --
--- Testing idate\(\) function with float -12.3456789000e10 to timestamp --
-int\((2004|1901|-1943)\)
-===DONE===
+Warning: idate() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing idate() function with float -12.3456789000e10 to timestamp --
+
+Warning: idate() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/localtime_variation3.phpt b/ext/date/tests/localtime_variation3.phpt
index d941e3891e..690c09bacb 100644
--- a/ext/date/tests/localtime_variation3.phpt
+++ b/ext/date/tests/localtime_variation3.phpt
@@ -1,5 +1,7 @@
--TEST--
Test localtime() function : usage variation - Passing higher positive and negetive float values to timestamp.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : array localtime([int timestamp [, bool associative_array]])
@@ -27,90 +29,22 @@ var_dump( localtime($timestamp, $is_associative) );
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing localtime\(\) : usage variation \*\*\*
+--EXPECTF--
+*** Testing localtime() : usage variation ***
--- Testing localtime\(\) function with 'float 12.3456789000e10' to timestamp --
-array\(9\) {
- \[0\]=>
- int\((16|0)\)
- \[1\]=>
- int\((50|30)\)
- \[2\]=>
- int\((4|0)\)
- \[3\]=>
- int\((26|11)\)
- \[4\]=>
- int\(2\)
- \[5\]=>
- int\((35|3982)\)
- \[6\]=>
- int\((2|6)\)
- \[7\]=>
- int\((84|69)\)
- \[8\]=>
- int\(0\)
-}
-array\(9\) {
- \["tm_sec"\]=>
- int\((16|0)\)
- \["tm_min"\]=>
- int\((50|30)\)
- \["tm_hour"\]=>
- int\((4|0)\)
- \["tm_mday"\]=>
- int\((26|11)\)
- \["tm_mon"\]=>
- int\(2\)
- \["tm_year"\]=>
- int\((35|3982)\)
- \["tm_wday"\]=>
- int\((2|6)\)
- \["tm_yday"\]=>
- int\((84|69)\)
- \["tm_isdst"\]=>
- int\(0\)
-}
+-- Testing localtime() function with 'float 12.3456789000e10' to timestamp --
--- Testing localtime\(\) function with 'float -12.3456789000e10' to timestamp --
-array\(9\) {
- \[0\]=>
- int\((44|52|0)\)
- \[1\]=>
- int\((9|45|30)\)
- \[2\]=>
- int\((19|20|23)\)
- \[3\]=>
- int\((8|13|22)\)
- \[4\]=>
- int\((9|11)\)
- \[5\]=>
- int\((104|1|-3843)\)
- \[6\]=>
- int\((5|-5)\)
- \[7\]=>
- int\((281|346|294)\)
- \[8\]=>
- int\(0\)
-}
-array\(9\) {
- \["tm_sec"\]=>
- int\((44|52|0)\)
- \["tm_min"\]=>
- int\((9|45|30)\)
- \["tm_hour"\]=>
- int\((19|20|23)\)
- \["tm_mday"\]=>
- int\((8|13|22)\)
- \["tm_mon"\]=>
- int\((9|11)\)
- \["tm_year"\]=>
- int\((104|1|-3843)\)
- \["tm_wday"\]=>
- int\((5|-5)\)
- \["tm_yday"\]=>
- int\((281|346|294)\)
- \["tm_isdst"\]=>
- int\(0\)
-}
-===DONE===
+Warning: localtime() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing localtime() function with 'float -12.3456789000e10' to timestamp --
+
+Warning: localtime() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/date/tests/strftime_variation23.phpt b/ext/date/tests/strftime_variation23.phpt
index b7cf8d788e..7e027851dd 100644
--- a/ext/date/tests/strftime_variation23.phpt
+++ b/ext/date/tests/strftime_variation23.phpt
@@ -1,5 +1,7 @@
--TEST--
Test strftime() function : usage variation - Checking large positive and negative float values to timestamp.
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
@@ -25,12 +27,16 @@ var_dump( strftime($format, $timestamp) );
?>
===DONE===
---EXPECTREGEX--
-\*\*\* Testing strftime\(\) : usage variation \*\*\*
+--EXPECTF--
+*** Testing strftime() : usage variation ***
--- Testing strftime\(\) function with float 12.3456789000e10 to timestamp --
-string\(\d*\)\s"Mar\s(26|11)\s(1935|5882)\s(04|00):(50|30):(16|00)"
+-- Testing strftime() function with float 12.3456789000e10 to timestamp --
--- Testing strftime\(\) function with float -12.3456789000e10 to timestamp --
-string\(\d*\)\s"(Oct|Dec)\s(08|13|22)\s(2004|1901|-1943)\s(19|20|23):(09|45|30):(44|52|00)"
-===DONE===
+Warning: strftime() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
+
+-- Testing strftime() function with float -12.3456789000e10 to timestamp --
+
+Warning: strftime() expects parameter 2 to be long, double given in %s on line %d
+bool(false)
+===DONE=== \ No newline at end of file
diff --git a/ext/standard/tests/strings/bug54322.phpt b/ext/standard/tests/strings/bug54322.phpt
index aead172b82..4834bdf236 100644
--- a/ext/standard/tests/strings/bug54322.phpt
+++ b/ext/standard/tests/strings/bug54322.phpt
@@ -5,5 +5,6 @@ Bug #54322: Null pointer deref in get_html_translation_table due to information
var_dump(
get_html_translation_table(NAN, 0, "UTF-8") > 0
);
---EXPECT--
-bool(true)
+--EXPECTF--
+Warning: get_html_translation_table() expects parameter 1 to be long, double given in %s on line %d
+bool(false)
diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt
index 580f8f0a6f..ca34959354 100644
--- a/ext/standard/tests/strings/chunk_split_variation5.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation5.phpt
Binary files differ
diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt
index cfb440e923..7f1e4959d4 100644
--- a/ext/standard/tests/strings/chunk_split_variation8.phpt
+++ b/ext/standard/tests/strings/chunk_split_variation8.phpt
@@ -83,8 +83,8 @@ It has _speci@l ch@r$ 2222 !!!Now \k as escape char to test
chunk_split():::"
-- Iteration 7 --
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
-bool(false)
+Warning: chunk_split() expects parameter 2 to be long, double given in %s on line %d
+NULL
-- Iteration 8 --
Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
diff --git a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
index 0e26d094a8..8fc4068b9a 100644
--- a/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
+++ b/ext/standard/tests/strings/htmlspecialchars_decode_variation2.phpt
@@ -102,7 +102,9 @@ 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>"
+
+Warning: htmlspecialchars_decode() expects parameter 2 to be long, double given in %s on line %d
+NULL
-- Iteration 4 --
string(114) "<html>Roy&#039;s height > Sam&#039;s height. 13 < 15. 1111 & 0000 = 0000. &quot; double quote string &quot;</html>"