3 ms·
It indicates the namespace where Override exists, which in this case is root level. \Namespace\Class is how namespaces in PHP work. If no \ is specified, it ass
by askonomm 3y ago
It indicates the namespace where Override exists, which in this case is root level. \Namespace\Class is how namespaces in PHP work. If no \ is specified, it assumes Override is in the same namespace as the class it is being used in, and it would thus fail because it isn't.
- oddevan 3y agoIf you're using it a lot, you can add a `use` declaration up top: <?php use Override; //... #[Override] public function overridenParentFunction(string $stuff) //...