Hello list,

sometimes I use PHP too, and today I noticed the things I described here.
Per coincidence, Jani, who is working on the new bugsystem, had the same
thoughts about this. I'll describe the problem now:

All the arrays which hold the vars are not in de global name space, you
you will always need to use the "global" keyword, or something like
$GLOBALS["HTTP_SESSION_VARS"]["username"]; As you all can see, that's way
to long and cumbersome to type. Just see this example:

global $HTTP_GET_VARS;
global $HTTP_POST_VARS;
global $HTTP_COOKIE_VARS;

if(     empty($HTTP_GET_VARS['PHPSESSID'])  &&
        empty($HTTP_POST_VARS['PHPSESSID']) &&
        empty($HTTP_COOKIE_VARS['PHPSESSID']) &&
        !empty($sessid)

I think this looks much better:
if ( empty ($GET_A['PHPSESSID']) &&
     empty ($POST_A['PHPSESSID']) &&
     empty ($COOKIE_A['PHPSESSID']) &&
     !empty ($sessid))

I propose to change the names of the arrays and to make these arrays
available in all functions, this will both eliminate the use of the global
keyword, and will shorten the names significantly. This will speed op
coding of course. Our proposal is to use the now second word of the array,
postfixed by _A (array).

regards,

Jani Taskinen
Derick Rethans


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to