Presto Presto - 3 months ago 8
PHP Question

What does the .= operator mean in PHP?

I have a variable that is being defined as

$var .= "value";


How does the use of the dot equal function?

Answer

It's the concatenating assignment operator. It works similarly to:

$var = $var . "value";

$x .= differs from $x = $x . in that the former is in-place, but the latter re-assigns $x.