PHP, remove all global variables in the global scope -


i want able flush variables in global scope using single function 1 call unset(). want keep variables exist in _get, _post, _request, _cookie, _server, _env, _files, _session, , remove variables exist in $globals[variable]. $globals contained...

<php> array ( [globals] => array *recursion* [_post] => array     (     )  [var_3] => array     (     )  [_get] => array     (     )  [_cookie] => array     (     )  [_server] => array     (         [https] => on         [appl_md_path] => /docs/         [appl_physical_path] => /www/docs/         [instance_id] => 1         [instance_meta_path] => /         [logon_user] =>          [request_uri] => /test.php         [url] => /test.php         [script_filename] => /www/docs/test.php         [document_root] => /www/docs/         [php_self] => /test.php         [http_host] => localhost     )  [_env] => array     (     )  [_files] => array     (     )  [_request] => array     (     )  [var_2] => array     (     )  [var_3] => array     (     ) ) </php> 

i want flush var_1, var_2 , var_3.

you can edit php.ini file , set:

variables_order = "" 

...setting "" means no superglobals set. [0]

[0] http://php.net/manual/en/ini.core.php#ini.variables-order


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -