What additional mathematical operations could be integrated into a PHP calculator for enhanced functionality?

To enhance the functionality of a PHP calculator, additional mathematical operations such as exponentiation, square root, factorial, and trigonometric functions can be integrated. These operations can provide users with more advanced calculations and make the calculator more versatile.

// Function to calculate exponentiation
function exponentiation($num1, $num2) {
    return pow($num1, $num2);
}

// Function to calculate square root
function squareRoot($num) {
    return sqrt($num);
}

// Function to calculate factorial
function factorial($num) {
    if ($num == 0) {
        return 1;
    } else {
        return $num * factorial($num - 1);
    }
}

// Function to calculate trigonometric functions
function trigonometric($num, $func) {
    switch ($func) {
        case 'sin':
            return sin($num);
            break;
        case 'cos':
            return cos($num);
            break;
        case 'tan':
            return tan($num);
            break;
        default:
            return "Invalid function";
    }
}