I'm trying to declare a global array but when trying to retrieve it it returns NULL
GamesManager.php
namespace TMSE;
use PDO;
class GamesManager extends Main {
protected $DB;
public $cards = array();
public function __construct() {
global $cards;
$this->$cards = array('2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, 'T' => 10, 'J' => 10, 'Q' => 10, 'K' => 10, 'A' => 11);
var_dump($cards);
}
public function pullCard() {
global $cards;
var_dump($cards);
}
}
Both var_dumps return NULL