Predefined Variables in PHP

1. PHP_SELF Example

This file name is: /infost440/a3/predefined.php
The $_SERVER['PHP_SELF'] variable stores the filename of the currently running script.

2. SERVER_NAME Example

The server name is: sanch649.soisweb.uwm.edu
The $_SERVER['SERVER_NAME'] variable stores the name of the server where the website is hosted.

Explanation

Predefined variables in PHP are built-in variables that already exist and provide useful information about the server, script, or user. They do not need to be created manually. These variables help developers access important data like file names, server details, and user input.