PHP_SELF Example

The current page is: /infost440/a3/predefined.php

SERVER_NAME Example

The server name is: kneaves.soisweb.uwm.edu

What Each Variable Means

PHP_SELF: This predefined variable gives the filename of the script that is currently running.

SERVER_NAME: This predefined variable gives the name of the server where the PHP page is running.

Explanation

Predefined variables are variables that PHP automatically provides for programmers to use. They can contain useful information about the server, webpage, user, or request. Unlike regular variables, I do not have to create these variables myself because PHP already makes them available.