PHP and Static Variables in Object Member Functions

后端 未结 3 1826
陌清茗
陌清茗 2021-01-04 00:13

Up until today, I thought I had a fairly good grasp of how the static modifier worked. I know that (in laymans terms) a static variable in a function does not \'reset\' acro

3条回答
  •  感情败类
    2021-01-04 00:47

    As far as I know, all languages with static variables treat them this way. Think of static variables as global variables that can only be accessed from a certain scope.

提交回复
热议问题