Return is typically used as
return $variable;
Using return() is documented to work, but I don't think you can put multiple variables in (maybe you can and I don't know any better - I'd guess they'd be treated like an array but if this was the case, you'd at least see "Array" displayed instead of nothing).
Typically, to pass back more than one value, you put those values in an array:
// ... function dimension(...)
$aArray = array();
$aArray[0] = $var1;
$aArray[1] = $var2;
return $aArray;
} // end function ...
Then to make use of the data, you might do:
$aMyNewArray = dimension();
// now $aMyNewArray contains the array returned
// or you could do:
list($var1, $var2) = dimension();
// This approach takes the array values and puts them into individual variables using the list command.
The other approach would be to pass the variables by reference, but generally speaking, this isn't the ideal way to go.