TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
542 B
31 lines
542 B
<?php
|
|
|
|
function fifteenSigDigitsWithExponent(): bool
|
|
{
|
|
return is_float(1.23456789012345e300);
|
|
}
|
|
|
|
function trailingZerosAreNotSignificant(): bool
|
|
{
|
|
return is_float(999999999999999.0);
|
|
}
|
|
|
|
function roundTripSixteenDigits(): bool
|
|
{
|
|
return is_float(2.220446049250313E-16);
|
|
}
|
|
|
|
function hexLiteralStaysNumeric(): float
|
|
{
|
|
return 0x123456789E1234567;
|
|
}
|
|
|
|
function autoDecimalKeepsPromotion()
|
|
{
|
|
return 3.14159265358979323846;
|
|
}
|
|
|
|
function decimalLiteralDemotesAgainstFloat(float $f): bool
|
|
{
|
|
return $f == 3.14159265358979323846;
|
|
}
|
|
|