Jump to content

session register VS $_SESSION[]


voip03

Recommended Posts

session register

  • session register returns Boolean type output
  • session_register() is a php function used to register variables with the current session
  • it will work only when register global is turned on in php.ini configuration file

 

$_SESSION[]

  • $_session returns string
  • $_SESSION[] is a super global array
  • SESSION works in both case whether register_global is disabled or enabled

 

 

Actually. <?= is making something of a comeback ( not <? though) as a shortcut for <?php echo

 

In 5.4:

 

<?= is now always available regardless of the short_tags setting (Rasmus)

 

This is good news IMO as it helps tidy the code used in allot of frameworks default view scripts.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.