Forum Moderators: coopster

Message Too Old, No Replies

Use of NULL to initialize $ Session Vars

Is this okay?

         

neophyte

1:24 am on Oct 3, 2006 (gmt 0)

10+ Year Member



The project I'm currently sweating through necessitates a fairly long list of $_Session Vars. When the first page of this app loads it initializes these vars with "Null".

I could use anything to initialize these vars, but I've used NULL for no specific reason and so far, so good. But is there anything that I should be worried about when using NULL for initialization?

When others init $_Session vars, what do you use?

Neophyte

eelixduppy

2:32 am on Oct 3, 2006 (gmt 0)



>>Is this okay?

I don't see any problems with it. Generally I let the var take its default value:


$var;