There are many ways to accomplish such a simple goal using a single line of code (well, two lines sometimes) that works with any number of values in the input array:
Solution #1
// Extract the first value from the array
$first = array_shift($test);
// Subtract the first value from the sum of the rest
echo(array_sum($test) - $first);
Solution #2
// Change the sign of the first value in the array (turn addition to subtraction)
$test[0] = -$test[0];
// Add all values; the first one will be subtracted because we changed its sign
echo(array_sum($test));
Solution #3
// Sum all values, subtract the first one twice to compensate
echo(array_sum($test) - 2 * $test[0]));
// There is no second line; that's all
Solution #4
// Compute the sum of all but the first value, subtract the first value
echo(array_sum(array_chunk($test, 1)) - $test[0]);
// There is no second line; two function calls are already too much
Solution #5
Left as an exercise to the reader.
Useful reading: the documentation of PHP array functions.