What is the significance of variable scope in PHP functions and how does it affect function execution?

Variable scope in PHP functions refers to the visibility and accessibility of variables within a function. When a variable is declared inside a function, it is considered to have a local scope and can only be accessed within that function. To make a variable accessible outside of a function, you can use the `global` keyword to declare it as a global variable.

$globalVar = 10;

function myFunction() {
    global $globalVar;
    echo $globalVar; // Output: 10
}

myFunction();