One of the big changes in PHP over the last few years has been that emergence of a relatively common set of code quality standards. One of the common problems that PHP programmers can make is mistyping (or, I suppose misunderstanding — but the simple typo seems more common) the difference between == and =. In the programming languages of my youth (I’m looking at you, 1981 Sinclair BASIC), we’d write things like: PHP does away with line numbers, but adds rather more brackets / parentheses, so we have things like the following: In PHP, though, that does not do what you might think. It does not check that x and y are the same, and echo the text if and only if they are.
So the line of code assigns the value of $y to the variable $x, and IF the assignment succeeded, echoes the text.