如何在不编写新函数的情况下从另一个文件调用变量

How can I call a variable from another file? Is it possible for a function to return 5 values? In my function.php file I grab a lot of values in different variables. For instance lets look at the function below
Function.php file

function getID($url)
{
  global $link;
  $ch = curl_init("http://example.com/?id=".$url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  $raw = curl_exec($ch);
  curl_close($ch);
  $data = json_decode($raw);
  $id=$data->id;
  $cname=$data->name;
  $info=$data->client_info;
  $up=$data->voteup;
  $cat=$data->category;

  return $id;
}

index.php file

  $myid=getID($url);
  echo "My ID : " . $myid;  -->This is working but not the below four....
  echo "Client Name : "
  echo "Information : "
  echo "Up Votes    : "
  echo "Category    : "

I do not want to keep everything in one file. In the index.php file, I also want to output 'cname', 'info', 'up', 'cat' values under 'myid'. I was thinking of making 4 different functions and get them one by one in the index.php file. Is there a better way like instead of returning only $id, the getID function can return the other four parameters too? Please advice.

return the data as an array is an option

function getID($url)
{
global $link;
$ch = curl_init("http://example.com/?id=".$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$raw = curl_exec($ch);
curl_close($ch);
//return the $raw json data as associative array
return json_decode($raw,true);
}

$myinfo=getID($url);
echo "My ID : " . $myinfo['id'];
echo "Client Name : " . $myinfo['client_info'];

etc...

Just return the object you already have

function getID($url)
{
  $ch = curl_init("http://example.com/?id=".$url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  $raw = curl_exec($ch);
  curl_close($ch);
  return json_decode($raw);
}

Then call that

$myid = getID($url);
echo "My ID : " . $myid->id;
echo "Client Name : " . $myid->name;
// etc