@@ -284,6 +284,14 @@ Bitwise Operators
284
284
* ``& `` (and)
285
285
* ``| `` (or)
286
286
* ``^ `` (xor)
287
+ * ``~ `` (not)
288
+ * ``<< `` (left shift)
289
+ * ``>> `` (right shift)
290
+
291
+ .. versionadded :: 7.2
292
+
293
+ Support for the ``~ ``, ``<< `` and ``>> `` bitwise operators was introduced
294
+ in Symfony 7.2.
287
295
288
296
Comparison Operators
289
297
~~~~~~~~~~~~~~~~~~~~
@@ -449,38 +457,38 @@ parentheses in your expressions (e.g. ``(1 + 2) * 4`` or ``1 + (2 * 4)``.
449
457
The following table summarizes the operators and their associativity from the
450
458
**highest to the lowest precedence **:
451
459
452
- +----------------------------------------------------------+---------------+
453
- | Operators | Associativity |
454
- +==========================================================+===============+
455
- | ``- `` , ``+ `` (unary operators that add the number sign) | none |
456
- +----------------------------------------------------------+---------------+
457
- | ``** `` | right |
458
- +----------------------------------------------------------+---------------+
459
- | ``* ``, ``/ ``, ``% `` | left |
460
- +----------------------------------------------------------+---------------+
461
- | ``not ``, ``! `` | none |
462
- +----------------------------------------------------------+---------------+
463
- | ``~ `` | left |
464
- +----------------------------------------------------------+---------------+
465
- | ``+ ``, ``- `` | left |
466
- +----------------------------------------------------------+---------------+
467
- | ``.. `` | left |
468
- +----------------------------------------------------------+---------------+
469
- | ``== ``, ``=== ``, ``!= ``, ``!== ``, | left |
470
- | ``< ``, ``> ``, ``>= ``, ``<= ``, | |
471
- | ``not in ``, ``in ``, ``contains ``, | |
472
- | ``starts with ``, ``ends with ``, ``matches `` | |
473
- +----------------------------------------------------------+---------------+
474
- | ``& `` | left |
475
- +----------------------------------------------------------+---------------+
476
- | ``^ `` | left |
477
- +----------------------------------------------------------+---------------+
478
- | ``| `` | left |
479
- +----------------------------------------------------------+---------------+
480
- | ``and ``, ``&& `` | left |
481
- +----------------------------------------------------------+---------------+
482
- | ``or ``, ``|| `` | left |
483
- +----------------------------------------------------------+---------------+
460
+ +----------------------------------------------------------------- +---------------+
461
+ | Operators | Associativity |
462
+ +================================================================= +===============+
463
+ | ``- `` , ``+ ``, `` ~ `` (unary operators that add the number sign) | none |
464
+ +----------------------------------------------------------------- +---------------+
465
+ | ``** `` | right |
466
+ +----------------------------------------------------------------- +---------------+
467
+ | ``* ``, ``/ ``, ``% `` | left |
468
+ +----------------------------------------------------------------- +---------------+
469
+ | ``not ``, ``! `` | none |
470
+ +----------------------------------------------------------------- +---------------+
471
+ | ``~ `` | left |
472
+ +----------------------------------------------------------------- +---------------+
473
+ | ``+ ``, ``- `` | left |
474
+ +----------------------------------------------------------------- +---------------+
475
+ | ``.. ``, `` << ``, `` >> `` | left |
476
+ +----------------------------------------------------------------- +---------------+
477
+ | ``== ``, ``=== ``, ``!= ``, ``!== ``, | left |
478
+ | ``< ``, ``> ``, ``>= ``, ``<= ``, | |
479
+ | ``not in ``, ``in ``, ``contains ``, | |
480
+ | ``starts with ``, ``ends with ``, ``matches `` | |
481
+ +----------------------------------------------------------------- +---------------+
482
+ | ``& `` | left |
483
+ +----------------------------------------------------------------- +---------------+
484
+ | ``^ `` | left |
485
+ +----------------------------------------------------------------- +---------------+
486
+ | ``| `` | left |
487
+ +----------------------------------------------------------------- +---------------+
488
+ | ``and ``, ``&& `` | left |
489
+ +----------------------------------------------------------------- +---------------+
490
+ | ``or ``, ``|| `` | left |
491
+ +----------------------------------------------------------------- +---------------+
484
492
485
493
Built-in Objects and Variables
486
494
------------------------------
0 commit comments