1.2.403. Echo With Concat¶
Optimize your echo
’s by avoiding concatenating at echo
time, but serving all argument separated. This will save PHP a memory copy.
If values, literals and variables, are small enough, this won’t have visible impact. Otherwise, this is less work and less memory waste. instead of It is a micro-optimisation.
<?php
echo $a, ' b ', $c;
?>
1.2.403.1. Connex PHP features¶
1.2.403.1.1. Suggestions¶
Turn the concatenation into a list of argument, by replacing the dots by commas.
1.2.403.1.2. Specs¶
Short name |
Structures/EchoWithConcat |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
ClearPHP |
|
Examples |
|
Available in |