Concatenation in PHP produces ‘0’ (zero)

If you’re concatenating a string in PHP and the result is a zero (“0”), check you haven’t mixed up your languages and used a “+” instead of “.” as your concatenation operator.

As a regular developer in C# and JavaScript regular, I sometimes write “$result = $part1 + $part2″ whereas I should write “$result = $part1 . $part2″.