Voting

: three plus zero?
(Example: nine)

The Note You're Voting On

Stephen Clay
19 years ago
<?php
"{$str1}{$str2}{$str3}"; // one concat = fast
$str1. $str2. $str3; // two concats = slow
?>
Use double quotes to concat more than two strings instead of multiple '.' operators. PHP is forced to re-concatenate with every '.' operator.

<< Back to user notes page

To Top