What is the correct syntax for accessing the PHP_SELF variable in PHP?

When accessing the PHP_SELF variable in PHP, it is important to use the $_SERVER superglobal array to retrieve the correct value. The PHP_SELF variable contains the filename of the currently executing script, making it useful for forms and actions that need to refer back to the same script. To access the PHP_SELF variable, you should use $_SERVER['PHP_SELF'].

$php_self = $_SERVER['PHP_SELF'];
echo $php_self;