These arrays are very special, and they automatically take effect on a global scale, for example, automatically in any scope. Therefore, it is often referred to as an automatic global variable (autoglobals) or a Super global variable (superglobals).
Copy Code code as follows:
<?php
$a = "PHP Tutorial Network";
echo "takes the variable value through \ $GLOBALS:". $GLOBALS [' a '];
Output: Using $globals to take variable values: PHP tutorial Web
echo "<br/>";
echo "The filename of the currently executing script:". $_server[' php_self '];
Output: filename of the currently executing script:/study_php/2-3.php
echo "<br/>";
echo "The root directory where the current execution script resides:". $_server[' Document_root '];
Output: The root directory where the current execution script resides: H:
echo "<br/>";
echo "The absolute path of the currently executing script:". $_server[' Script_filename '];
Output: The absolute path of the currently executing script: h:/study_php/2-3.php
?>