I noticed Interspire Shopping Cart initializes a lot of it's classes to a PHP's $GLOBALS variable. Is there any performance or security issues when doing this?
Below is a fake file but written similar to that of Interspire Shopping Cart's.
<?php
// account.php
$GLOBALS['USER_ACCOUNT'] = new USER_ACCOUNT();
$GLOBALS['USER_ACCOUNT']->createPage(); //creating the page
?>
I have noticed that within the process of creating the page (see above) other files that get included will need access to the $GLOBALS['USER_ACCOUNT']. So this class instance will be needed by others later down the line.