Hello, looked at the performances zendovtsa , read articles on Habré . The field of what appeared is a logical, but philosophical question about code optimization.
Now
echo 'Hello', $username, '!'; slower than
echo 'Hello, {$username}!'; // вероятно, фигурные — лишние Now something like
for ($i = 0, $l = count($arr); $i < $l; $i++) { $str = 'Hello, World'; } Equivalently:
$str = 'Hello, World'; for ($i = 0; $i < count($arr); $i++) {} Because the string is immutable and the interpreter knows this. That is, you will write unset($str) at the end of this block, how it will be slower to work ... It is strange to me. Explain, please, supporting sources how now to write the code more optimally? Where to write unset.
echo. That is more, it is less, time at once it is not necessary. Sandbox.onlinephpfunctions.com/code/… test - Visman