Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access a local PHP variable is faster that access a session PHP variable?

Tags:

php

This is justa a performance question.

What is faster, access a local PHP variable or try to access to session variable?

like image 519
Alfonso Avatar asked Sep 01 '26 11:09

Alfonso


1 Answers

I do not think that this makes any measurable difference. $_SESSION is filled by PHP before your script actually runs, so this is like accessing any other variable.

like image 151
jwueller Avatar answered Sep 04 '26 00:09

jwueller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!