3 ms·
I hated it till I started using it, now I don't mind. Dot was never used in PHP because it's the string concat operator. PHP needs a unique operator for names
by wvenable 13y ago
I hated it till I started using it, now I don't mind. Dot was never used in PHP because it's the string concat operator. PHP needs a unique operator for namespaces because the types of symbols (is it a namespace, class, interface, etc) aren't known at compile time (unlike Java, C#, etc).
- coldtea 13y ago>Dot was never used in PHP because it's the string concat operator. So how about them using the -> operator? Most languages that use . for class method access also reuse it for namespacing.