How can you retrieve the current file name in PHP?

To retrieve the current file name in PHP, you can use the `basename()` function along with the `__FILE__` magic constant. This function will return the base name of the file, which is essentially the file name without the directory path. By using `basename(__FILE__)`, you can easily retrieve the current file name in PHP.

$currentFileName = basename(__FILE__);
echo "Current file name: " . $currentFileName;