I have to return some data by calling function, but global variable values we can't access inside function so I used global keyword,however after using global keyword it is making that variable empty,but I have to check condition by using that variable, so how to prevent variable values which is get replaced by global keyword,
$url = $_SERVER['REQUEST_URI'];
$url = explode('/', $url);
$url = end(url);
$param='some_value';
active(); // call active unction
function active()
{
global $url, $param;
// after using global keyword $url,$param values replaced with empty by global keyword
}