Why is $M-; syntactically valid and what does it do?
php
Solution
That's an en dash, which to PHP is just a random byte without specific meaning. `$M–`, or in UTF-8 encoding `4DE28093`, is a valid variable name. Just like `$漢字`.
A single variable by itself just initializes that variable to `null` if it doesn't already exist, the line doesn't do anything else.
Problem
I don't consider myself as PHP expert but I've designed several pages now containing a couple of thousand lines of code each. For my current project which is for a game site I drew back on an existing function which contains the line ``` $M–; ``` Now my basic understanding of PHP tells me this doesn't work since it should be -- for short -1. But it's not a dash, the script runs without error (`error_reporting (E_ALL)`) but echoing `$M` before and after gives me the same value. So what does it do and why don't I get an error?