How can scope affect the availability of variables in PHP functions?

Scope in PHP functions refers to the visibility of variables within the function. Variables declared outside of a function have global scope and can be accessed within the function using the `global` keyword. However, it is generally recommended to pass variables as parameters to functions to avoid potential conflicts and make the code more modular and easier to understand.

<?php

$globalVariable = "I am a global variable.";

function exampleFunction($param) {
    echo $param;
}

exampleFunction($globalVariable);

?>