PHP ::: Speed Test ::: $_SESSION vs. $variable

前端 未结 3 1606
臣服心动
臣服心动 2020-12-21 16:16

I have a form with a fairly large amount of input that will also be high traffic. I declare $_SESSION vars so that on validation fails data that passes doesnt have to be rew

3条回答
  •  失恋的感觉
    2020-12-21 16:59

    There is a marginal difference in performance. When I say marginal, I mean really, really small. The fact that it's the $_SESSION array doesn't have any bearing performance. It's the associative array lookup that takes slightly longer than accessing a variable.

提交回复
热议问题