How can one test the functionality of the PHP_SELF variable locally on a server?

The PHP_SELF variable can be tested locally on a server by creating a simple PHP script that echoes the value of PHP_SELF. This can help verify if the variable is working correctly and returning the expected value. By running this script on a local server environment, you can easily test the functionality of PHP_SELF.

<?php
echo $_SERVER['PHP_SELF'];
?>