3 ms·
\ was an odd choice, unfortunately reminiscent of MSDOS, but I have to admit that it does help when reading code that a path with \ signals that this is a names
by snorkel 14y ago
\ was an odd choice, unfortunately reminiscent of MSDOS, but I have to admit that it does help when reading code that a path with \ signals that this is a namespace path where :: is a static class member.
- mgkimsal 14y agoExcept :: doesn't always indicate a static class member. parent::foo(); The :: is not indicating that the call to the parent be made statically. $this is a reserved variable in classes - $parent or $super should have been as well.
- encoderer 14y agoThe grandparent has the right sentiment but the wrong language. When you see :: you know you're addressing a specific class and not a namespace. And since PHP doesn't have any concept of a class-instance there's nothing mucking that up.