What are some common methods to retrieve the name of the current running script in PHP?

To retrieve the name of the current running script in PHP, you can use the `$_SERVER['SCRIPT_NAME']` superglobal variable. This variable contains the path of the current script being executed. You can then use `basename()` function to extract just the file name from the path.

$currentScript = basename($_SERVER['SCRIPT_NAME']);
echo $currentScript;