File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
components/expression_language Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,21 @@ Supported Literals
14
14
The component supports:
15
15
16
16
* **strings ** - single and double quotes (e.g. ``'hello' ``)
17
- * **numbers ** - e.g. ``103 ``
17
+ * **numbers ** - integers (e.g. ``103 ``), decimals (e.g. ``9.95 ``), decimals
18
+ without leading zeros (e.g. ``.99 ``, equivalent to ``0.99 ``); all numbers
19
+ support optional underscores as separators to improve readability (e.g.
20
+ ``1_000_000 ``, ``3.14159_26535 ``)
18
21
* **arrays ** - using JSON-like notation (e.g. ``[1, 2] ``)
19
22
* **hashes ** - using JSON-like notation (e.g. ``{ foo: 'bar' } ``)
20
23
* **booleans ** - ``true `` and ``false ``
21
24
* **null ** - ``null ``
22
25
* **exponential ** - also known as scientific (e.g. ``1.99E+3 `` or ``1e-2 ``)
23
26
27
+ .. versionadded :: 6.1
28
+
29
+ Support for decimals without leading zeros and underscore separators were
30
+ introduced in Symfony 6.1.
31
+
24
32
.. caution ::
25
33
26
34
A backslash (``\ ``) must be escaped by 4 backslashes (``\\\\ ``) in a string
You can’t perform that action at this time.
0 commit comments