How can the E.V.A.-Principle be applied to improve PHP code efficiency and readability?

Issue: The E.V.A.-Principle (Eliminate, Validate, Automate) can be applied to improve PHP code efficiency and readability by removing unnecessary code, validating inputs to prevent errors, and automating repetitive tasks. Code snippet:

// Eliminate unnecessary code
unset($unusedVariable);

// Validate input to prevent errors
$input = $_POST['input'] ?? '';
if (!is_numeric($input)) {
    die('Input must be a number');
}

// Automate repetitive task
function calculateArea($radius) {
    return M_PI * pow($radius, 2);
}
$area = calculateArea(5);
echo 'The area is: ' . $area;