Adding keys to superglobals in php

Posted by gautam kumar on Stack Overflow See other posts from Stack Overflow or by gautam kumar
Published on 2010-06-11T04:26:01Z Indexed on 2010/06/11 4:32 UTC
Read the original article Hit count: 198

Filed under:
|

Is there any way by which I can add keys to superglobals in php without defining the corresponding values to those key?

For example:

$_SESSION['key']='set';//key` automatically gets defined.

But I want to do something like this

add_key($_SESSION,'key')//key is added to $_SESSION array.

Is it possible?

© Stack Overflow or respective owner

Related posts about php

Related posts about session