Either language construct print or echo should be used.
The desired language construct.
Allowed values: 'echo' and 'print'
Default value: 'echo'
Default configuration.
--- Original
+++ New
-<?php print 'example';
+<?php echo 'example';With configuration: ['use' => 'print'].
--- Original
+++ New
-<?php echo('example');
+<?php print('example');The rule is part of the following rule sets:
- Fixer class: PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer
- Test class: PhpCsFixer\Tests\Fixer\Alias\NoMixedEchoPrintFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.