PHP_SELF is a variable that returns the current script being executed. This variable returns the name and path of the current file (from the root folder). You can use this variable in the action field of the FORM or any place when you write a code dynamically. 

Following is the example of PHP_SELF.

echo $_SERVER['PHP_SELF'];