Skip to content

Commit 465940a

Browse files
Document rawValue printing
1 parent 8004c8f commit 465940a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/component/Pretty_printing.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ The pretty printer respects a number of attributes used by some nodes:
3636
* `kind` on `Scalar\String_` to use single quotes (default), double quotes, heredoc or nowdoc.
3737
In the latter two cases, the heredoc/nowdoc label from the `docLabel` attribute is used.
3838
* `kind` on `Scalar\Int_` to use decimal (default), binary, octal or hexadecimal representation.
39+
* `shouldPrintRawValue` and `rawValue` on `Scalar\Int_` to preserve the original formatting of
40+
integer literals (e.g., numeric separators like `1_000`). When `shouldPrintRawValue` is set to
41+
`true`, the value from `rawValue` is used instead of the computed representation. This works for
42+
all integer formats (decimal, binary, octal, hexadecimal).
3943
* `kind` on `Cast\Double` to use `(double)` (default), `(float)` or `(real)`.
4044
* `kind` on `Expr\List_` to use `[]` or `list()` (default depends on `phpVersion` option).
4145
* `kind` on `Expr\Array_` to use `[]` or `array()` (default depends on `shortArraySyntax` option).

0 commit comments

Comments
 (0)