hi there
does anybody know what id different between Yii and \Yii like here : http://www.yiiframework.com/doc-2.0/guide-security-authorization.html
hi there
does anybody know what id different between Yii and \Yii like here : http://www.yiiframework.com/doc-2.0/guide-security-authorization.html
seems no diffs:
if(\Yii::$app === Yii::$app) echo 'same';
It depends on the namespace you are in… check some namespace basics - http://php.net/manual/en/language.namespaces.basics.php
I guess that, thinking in terms of the hierarchy of namespaces, is better to always use “\Yii”, because there is not another Yii class in the tree, or is it? I’m in my first week of learning Yii 2.