I've got a $db variable (and others) in my global config and I've seen some sample code recently like:
function getInfo(\My\Namespace\DB $db) {...}
and then calling getInfo($db);
but I'm used to just doing:
function getInfo() {
global $db;
...
}
What's the difference and is one better/preferred/best practice compared to the other now?
Thanks.