In the PHP documentation, I found the following part:
Dots and spaces in variable names are converted to underscores. For example, <input name="ab" /> becomes $_REQUEST["a_b"] .
I know that although PHP could not make the $ab variable for register_globals , but this explanation does not make me completely happy. Although, indeed, register_globals would have to do this (or even if it werenβt because of ${'a.b'} ), but why did it affect global variables like $_GET , where technically you had to give a string from the beginning (so PHP programmers couldn't forget about the ${'a.b'} tags in the case of $_GET ).
And why does this only affect dots and spaces? Although I can understand the dots ( <input type=image> ) why this would affect the spaces. What about a hyphen?
source share