You misunderstand the question. The issue at hand is not the actual name of the variable, but the string you are assigning the variable to. The exercise I linked to above directs learners to declare a variable called myName. If you read that exercise, the question should make more sense. Let me know if it's still unclear.
With that in mind, the helpful piece of the documentation can be found here: http://php.net/manual/en/language.types.string.php#language.types.string.details which states that PHP "has no information about how those bytes translate to characters, leaving that task to the programmer" and "does not dictate a specific encoding for strings," as "that string will be encoded in whatever fashion it is encoded in the script file." I took this to mean the error was on codecademy's end and could be remedied with an extra line in the tutorial simply stating that hyphens cannot be used within strings within the tutorial.
However, I'll be the first to admit that I do not entirely understand everything written on that documentation page, and was/am curious if I was misinterpreting something and PHP itself does not support dashes.