找到多个变量中最大的变量

I have four variables $a, $b, $c and $d. They each have an integer value assigned to them. I need to find the variable with the highest value (Not the value itself). This is what I tried :

// $a, $b, $c, $d are initialized with values here

$highest_value = max($a,$b,$c,$d);
if($a==$highest_value){$biggest_variable = 'a'};
if($b==$highest_value){$biggest_variable = 'b'};
if($c==$highest_value){$biggest_variable = 'c'};
if($d==$highest_value){$biggest_variable = 'd'};

While not very efficient, it gets the job done. But this falls flat if any of the variables are equal in value. This seemingly simple problem has me stumped! Is there any simpler solution than manually comparing each variable to check if any are equal?

EDIT : Okay so, the reason for sorting is for scoring. Each variable constitutes a Team. Scores are calculated as :

Winning Team = 1,000,000 / Value , Other Teams = 200,000 / Value

So with a = 10 and rest having values 3,4,5 for b,c,d, Score for a is 1,000,000 / 10, Rest would be 200,000 divided by their respective values.

You can create an array which you can use to look up the name. Then just use max() as before with the created array and to get the names use array_keys(), e.g.

<?php

    $a = 4;
    $b = 7;
    $c = 2;
    $d = 1;

    $arr = ["a" => $a, "b" => $b, "c" => $c, "d" => $d];

    print_r(array_keys($arr, max($arr)));

?>

output:

Array(
    [0] => b
)

You can create an array which you can use to look up the name. Then just use asort() with the created array and to get the names use array_keys() and end(), e.g.

<?php
// Defining a function
function getHighest($values = array())
{
    // Sorting the array
    asort($values);

    // Get the sorted array keys
    $keys = array_keys($values);

    // Return the last key
    return end($keys);
}

// Define array with values from $a, $b, $c and $d
$array = array(
    'a' => $a,
    'b' => $b,
    'c' => $c,
    'd' => $d,
);

// Pass array to getHighest()
$highest = getHighest($array);
?>

Try this

$array = array
    (
    'a' => 10,
    'b' => 20,
    'c' => 15,
    'd' => 5
);

echo $highest_value = max($array);

print_r(array_keys($array,$highest_value));

Phpfiddle Preview

You can use compact to create an associative array and array_search to get the key.

$values = compact("a", "b", "c", "d");
$highest_value = max($values);
$key = array_search($highest_value, $values);

As noted by others, if you had equal max values, this would only give you the first of the variables.