diff --git a/tests/compiler/basic/pow-int-overflow-native-type.phpt b/tests/compiler/basic/pow-int-overflow-native-type.phpt index 45b7083d..bccfa002 100644 --- a/tests/compiler/basic/pow-int-overflow-native-type.phpt +++ b/tests/compiler/basic/pow-int-overflow-native-type.phpt @@ -5,9 +5,13 @@ pow int overflow use native_types; function main() { + // PHP 8.5 warns when the overflowing float is narrowed to a native int. + // This test covers the resulting value; a version-specific companion test + // covers the warning so this expectation remains stable on PHP 8.4/8.5. + error_reporting(E_ERROR); $a = 2 ** 80; echo $a, PHP_EOL; } ?> --EXPECT-- -0 \ No newline at end of file +0 diff --git a/tests/compiler/basic/pow-int-overflow-warning-php85.phpt b/tests/compiler/basic/pow-int-overflow-warning-php85.phpt new file mode 100644 index 00000000..46bb8262 --- /dev/null +++ b/tests/compiler/basic/pow-int-overflow-warning-php85.phpt @@ -0,0 +1,20 @@ +--TEST-- +PHP 8.5 warns when pow overflow is narrowed to a native int +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: The float %s is not representable as an int, cast occurred in %s on line %d +0 diff --git a/tests/compiler/float_edge/edge-cases.phpt b/tests/compiler/float_edge/edge-cases.phpt index e14b1c1e..40905e38 100644 --- a/tests/compiler/float_edge/edge-cases.phpt +++ b/tests/compiler/float_edge/edge-cases.phpt @@ -3,6 +3,7 @@ Float edge cases: NAN, INF, -INF --FILE-- +--FILE-- + +--EXPECTF-- +Warning: unexpected NAN value was coerced to string in %s on line %d +NAN