What is the significance of the $ sign in PHP return statements?

In PHP, the $ sign is used to indicate a variable. When using return statements in PHP, the $ sign should not be used before the variable name as it will cause a syntax error. To fix this issue, simply remove the $ sign before the variable name in the return statement.

// Incorrect return statement with $ sign before variable name
function getNumber() {
    $number = 10;
    return $number; // Incorrect usage of $ sign before variable name
}

// Correct return statement without $ sign before variable name
function getNumber() {
    $number = 10;
    return number; // Correct usage without $ sign before variable name
}