There are plenty of places where PHP doesn't allow whitespace currently.

The most comparable example is between namespace separators:

Ns \ bar();
Ns \ SOME_CONST;

are both syntax errors.

`MyClass::bar()` and `MyClass::SOME_CONST` are often used in place of
`Ns\bar()` and `Ns\SOME_CONST` because the former invokes the autoloader in
a way the latter does not. My gut tells me they should behave the same way
with respect to whitespace, too.

In some situations PHP _does_ treat the identifier "Foo::bar" differently
to "Foo :: bar":

class A {
    public static function b() {
        return 5;
    }
}

echo "A::b"(); // works
echo "A :: b"(); // fatal error

Reply via email to