note 102008 rejected from reserved.variables.globals by rquadling

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: qubsoft at gmail dot com 

----

Here's a function which returns an array of all user defined global variables:

<?php
function globals() {
	$globals = $GLOBALS;
	foreach (array(
		'GLOBALS',
		'_ENV',
		'HTTP_ENV_VARS',
		'_POST',
		'HTTP_POST_VARS',
		'_GET',
		'HTTP_GET_VARS',
		'_COOKIE',
		'HTTP_COOKIE_VARS',
		'_SERVER',
		'HTTP_SERVER_VARS',
		'_FILES',
		'HTTP_POST_FILES',
		'_REQUEST'
	) as $var) {
		unset($globals[$var]);
	}
	
	return $globals;
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.