What is the difference between using $_GET as an array and as a function in PHP?

When using $_GET as an array in PHP, you can access query string parameters directly using keys. However, when using $_GET as a function, you need to pass the key of the parameter you want to retrieve as an argument to the function. The difference lies in the syntax and convenience of accessing query string parameters.

// Accessing query string parameters as an array
$param1 = $_GET['param1'];
$param2 = $_GET['param2'];

// Accessing query string parameters using $_GET as a function
$param1 = $_GET('param1');
$param2 = $_GET('param2');