mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-29 13:17:36 +01:00
Make sure dnumbers are printed as dnumbers even if they could be printed as ints
This commit is contained in:
parent
eaffc0073c
commit
c94b09dec0
@ -67,7 +67,9 @@ class PrettyPrinter_Zend extends PrettyPrinterAbstract
|
||||
}
|
||||
|
||||
public function pScalar_DNumber(Node_Scalar_DNumber $node) {
|
||||
return (string) $node->value;
|
||||
return (int) $node->value == $node->value
|
||||
? (string) $node->value . '.0' // ensure that number is really printed as float
|
||||
: (string) $node->value;
|
||||
}
|
||||
|
||||
// Assignments
|
||||
|
Loading…
x
Reference in New Issue
Block a user