mardi 2 août 2016

Best practise with sessions tests and functions

Even this seems to be a very trivial question, I wonder what is the best practice when dealing with sessions.

  • In the main code, test if a session var is set then call a function ?
  • just call the function within the general code, and within this function perform the corresponding tests (if the session var doesn't exist, create it...)
  • other ?

Are those approaches even in terms of performance ?

Aucun commentaire:

Enregistrer un commentaire