I am trying to learn using php for practical applications by studying opencart source code and I am stuck at a point
// Register Globals
if (ini_get('register_globals')) {
ini_set('session.use_cookies', 'On');
ini_set('session.use_trans_sid', 'Off');
session_set_cookie_params(0, '/');
session_start();
$globals = array($_REQUEST, $_SESSION, $_SERVER, $_FILES);
foreach ($globals as $global) {
foreach(array_keys($global) as $key) {
unset(${$key});
}
}
}
- What I understand is we are trying to unset all the session variables,but if the session was not started earlier why we need to unset it ?
What do unset(${$key}) do exactly ?
Why opencart uses myisam engine ?