1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- ============================
- Rule ``no_mixed_echo_print``
- ============================
- Either language construct ``print`` or ``echo`` should be used.
- Configuration
- -------------
- ``use``
- ~~~~~~~
- The desired language construct.
- Allowed values: ``'echo'`` and ``'print'``
- Default value: ``'echo'``
- Examples
- --------
- Example #1
- ~~~~~~~~~~
- *Default* configuration.
- .. code-block:: diff
- --- Original
- +++ New
- -<?php print 'example';
- +<?php echo 'example';
- Example #2
- ~~~~~~~~~~
- With configuration: ``['use' => 'print']``.
- .. code-block:: diff
- --- Original
- +++ New
- -<?php echo('example');
- +<?php print('example');
- Rule sets
- ---------
- The rule is part of the following rule sets:
- - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
- - `@Symfony <./../../ruleSets/Symfony.rst>`_
|