<?php
/**
* Function to get or set a global variable
* @param type $key
* @param type $value
* @return value of the given key
*/
function sphere_global($key, $value = null) {
$returnVal = false;
if ($value !== null) {
$GLOBALS [$key] = $value;
}
$returnVal = isset ( $GLOBALS [$key] ) ? $GLOBALS [$key] : false;
return $returnVal;
}