This is a ‘superglobal’, or automatic global, variable. It means that it is available in all scopes throughout a script. There is no need to do global $variable to access it within functions or methods.

Example:
Code:

 

$_ENV [ 'mystring'] = 'Hello World' ; 
$_ENV [ 'myarray' ] = array( 'Nokia' , 'Samsung' , 'Blackberry' ); 

function check () { 
print $_ENV [ 'mystring' ]; 
print_r ( $_ENV [ 'myarray' ]); 
} 

check  ();    

Output:

Hello World

Array
(
[0] => Nokia
[1] => Samsung
[2] => Blackberry
)

eXTReMe Tracker