It is a good or a bad practice to call global variables inside class methods? Yes/No and why? Check the following example:
PHP file that contains the global variable:
$a = ['a1','a2','a3','a4','a5'];
Class method:
private function foo($i)
{
global $a;
return $a[$i];
}