Predefined Variables in PHP

Example 1: $_SERVER['SERVER_NAME']

Server Name: truong2.soisweb.uwm.edu

Example 2: $_SERVER['PHP_SELF']

Current File Path: /infost440/a3/predefined.php

Predefined variables, also called superglobals, are built-in variables automatically available in PHP. They store important information about the server environment, user requests, and script execution. For example, $_SERVER contains information about headers, paths, and script locations. These variables do not need to be declared and can be accessed anywhere in the script.