What are the differences between using $REMOTE_ADDR and $_SERVER['REMOTE_ADDR'] in PHP?

When accessing the client's IP address in PHP, it is recommended to use $_SERVER['REMOTE_ADDR'] instead of $REMOTE_ADDR. This is because $REMOTE_ADDR is a variable that needs to be set by the developer, while $_SERVER['REMOTE_ADDR'] is a predefined server variable that contains the client's IP address.

// Using $_SERVER['REMOTE_ADDR'] to get the client's IP address
$client_ip = $_SERVER['REMOTE_ADDR'];
echo "Client's IP address: " . $client_ip;