Skip to content

Commit ae475bd

Browse files
committed
Test PHP_FLOAT_MIN only on PHP >= 8.3
1 parent df53195 commit ae475bd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/Type/StringifyTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public static function provideCases(): iterable
7272
yield [floatT(1.23000e2), '123.0'];
7373
yield [floatT(1.23000e-2), '0.0123'];
7474
yield [floatT(PHP_FLOAT_EPSILON), '0.00000000000000022204460492503'];
75-
yield [floatT(PHP_FLOAT_MIN), '0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585000'];
75+
76+
if (PHP_VERSION_ID >= 80300) {
77+
yield [floatT(PHP_FLOAT_MIN), '0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585000'];
78+
}
79+
7680
yield [floatT(-PHP_FLOAT_MAX), '-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0'];
7781
yield [floatT(-PHP_FLOAT_MAX - 1), '-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0'];
7882
yield [floatT(PHP_FLOAT_MAX), '179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0'];

0 commit comments

Comments
 (0)