What are common syntax errors to watch out for when returning arrays from functions in PHP?

Common syntax errors when returning arrays from functions in PHP include forgetting to use the `return` keyword to actually return the array, not enclosing the array in parentheses, and not properly defining the function signature to indicate that it returns an array. To solve these issues, make sure to use `return` followed by the array variable, enclose the array in parentheses if necessary, and define the function with the correct return type.

// Incorrect way to return an array from a function
function getArray() {
    $arr = [1, 2, 3];
}

// Correct way to return an array from a function
function getArray(): array {
    $arr = [1, 2, 3];
    return $arr;
}