What is the significance of using $_SERVER['PHP_SELF'] instead of $PHPSELF in the form action attribute in PHP?

Using $_SERVER['PHP_SELF'] instead of $PHP_SELF in the form action attribute in PHP is significant because $PHP_SELF is not a predefined variable in PHP. $_SERVER['PHP_SELF'] is a predefined variable that contains the filename of the currently executing script, making it a secure and reliable way to refer to the current script in form actions.

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
  <!-- form elements here -->
</form>