Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ Warning: The float NAN is not representable as an int, cast occurred in %s on li
int(0)
int(3)
int(3)

Warning: The float-string "1.0E+121" is not representable as an int, cast occurred in %s on line %d
int(9223372036854775807)

Warning: The float-string "1.0E+301" is not representable as an int, cast occurred in %s on line %d
int(9223372036854775807)
int(0)
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ Warning: The float NAN is not representable as an int, cast occurred in %s on li
int(0)
int(3)
int(3)

Warning: The float-string "1.0E+121" is not representable as an int, cast occurred in %s on line %d
int(2147483647)

Warning: The float-string "1.0E+301" is not representable as an int, cast occurred in %s on line %d
int(2147483647)
int(0)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ var_dump($b | 1);

?>
--EXPECTF--
The float-string "1.0E+4%d" is not representable as an int, cast occurred
Implicit conversion from float-string "1.0E+4%d" to int loses precision
int(%d)
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ var_dump($array[$string_float]);
--EXPECTF--
Warning: The float 1.0E+121 is not representable as an int, cast occurred in %s on line %d
int(0)

Warning: The float-string "1.0E+121" is not representable as an int, cast occurred in %s on line %d
bool(true)

Warning: The float 1.0E+121 is not representable as an int, cast occurred in %s on line %d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ var_dump($string);
--EXPECTF--
Warning: The float 1.0E+121 is not representable as an int, cast occurred in %s on line %d
int(0)

Warning: The float-string "1.0E+121" is not representable as an int, cast occurred in %s on line %d
int(9223372036854775807)
Attempt to read
Float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ var_dump($string);
--EXPECTF--
Warning: The float 1.0E+121 is not representable as an int, cast occurred in %s on line %d
int(0)

Warning: The float-string "1.0E+121" is not representable as an int, cast occurred in %s on line %d
int(2147483647)
Attempt to read
Float
Expand Down
2 changes: 0 additions & 2 deletions Zend/zend_operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,8 @@ static zend_always_inline zend_long zend_dval_to_lval_silent(double d)
static zend_always_inline zend_long zend_dval_to_lval_cap(double d, const zend_string *s)
{
if (UNEXPECTED(!zend_finite(d))) {
zend_oob_string_to_long_error(s);
return 0;
} else if (!ZEND_DOUBLE_FITS_LONG(d)) {
zend_oob_string_to_long_error(s);
return (d > 0 ? ZEND_LONG_MAX : ZEND_LONG_MIN);
}
return (zend_long)d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ int(1)
string(7) "integer"
-- Iteration 20 --
string(6) "string"
2: The float-string "2974394749328742328432" is not representable as an int, cast occurred
bool(true)
int(2147483647)
string(7) "integer"
Expand Down Expand Up @@ -305,7 +304,6 @@ int(1)
string(7) "integer"
-- Iteration 26 --
string(6) "string"
2: The float-string "2974394749328742328432" is not representable as an int, cast occurred
bool(true)
int(2147483647)
string(7) "integer"
Expand Down Expand Up @@ -675,7 +673,6 @@ int(1)
string(7) "integer"
-- Iteration 20 --
string(6) "string"
2: The float-string "2974394749328742328432" is not representable as an int, cast occurred
bool(true)
int(2147483647)
string(7) "integer"
Expand Down Expand Up @@ -706,7 +703,6 @@ int(1)
string(7) "integer"
-- Iteration 26 --
string(6) "string"
2: The float-string "2974394749328742328432" is not representable as an int, cast occurred
bool(true)
int(2147483647)
string(7) "integer"
Expand Down
8 changes: 0 additions & 8 deletions ext/standard/tests/general_functions/intval.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,11 @@ int(-2147483648)
int(2147483647)

*** Testing intval() on non integer types ***

Warning: The float-string "-2147483649" is not representable as an int, cast occurred in %s on line %d
int(-2147483648)

Warning: The float-string "2147483648" is not representable as an int, cast occurred in %s on line %d
int(2147483647)
int(0)
int(0)

Warning: The float-string "020000000001" is not representable as an int, cast occurred in %s on line %d
int(2147483647)

Warning: The float-string "-020000000001" is not representable as an int, cast occurred in %s on line %d
int(-2147483648)
int(0)
int(0)
Expand Down
2 changes: 0 additions & 2 deletions ext/tidy/tests/gh20374.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ foreach ($values as $key => $value) {
</body>
</html>
--- double overflow ---

Warning: The float-string "1.2089258196146E+24" is not representable as an int, cast occurred in %s on line %d
<html>
<head>
<title></title>
Expand Down