Skip to content

Commit 2707021

Browse files
sebastianbergmannnikic
authored andcommitted
Use canonical cast name to avoid deprecation notice on PHP >= 8.5
1 parent c95b500 commit 2707021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/PhpParser/PrettyPrinter/Standard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ protected function pScalar_DNumber(Scalar\DNumber $node) {
223223

224224
// Try to find a short full-precision representation
225225
$stringValue = sprintf('%.16G', $node->value);
226-
if ($node->value !== (double) $stringValue) {
226+
if ($node->value !== (float) $stringValue) {
227227
$stringValue = sprintf('%.17G', $node->value);
228228
}
229229

0 commit comments

Comments
 (0)