sneakyimp
TIL (not really today, but it came up again today) that a nonbreaking space is a valid character that can be used in identifiers.
<?php
$foย = 42;
$fo = 17;
echo $foย ;
Outputs 42 because of course that's $foย in the first and third positions, but only $fo in the middle.
And it's also valid in constants as well (strictly speaking, almost all strings are valid as constant names, but most of them can't be used without wrapping them in constant()):
<?php
define('ย ', 42);
function foo() { returnย ;}
echo foo();
Edit: Hey; still got the error message but the thread got bumped to the top of the list!