$a = 2; $b = 3;
function Num($a, $b){
$c = $a + $b;
$d = $a * $b;
return $c, $d; // Вот тут весь вопрос
}
$a = 2; $b = 3;
function Num($a, $b){
$c = $a + $b;
$d = $a * $b;
return [$c, $d];
}
list($c, $d) = Num($a, $b);
echo "$c|$d";
// 5|6
$a = 2; $b = 3; $c = $d = null;
function Num($a, $b, &$c, &$d){
$c = $a + $b;
$d = $a * $b;
}
Num($a, $b, &$c, &$d);
echo "$c|$d";
// 5|6
return $c;
return $d;