doyouhaobaby
V2EX  ›  PHP

PHP RFC: Preloading 预加载静态成员和变量它们的值不会重新返回请求边界

  •  
  •   doyouhaobaby · May 17, 2019 · 3897 views
    This topic created in 2578 days ago, the information mentioned may be changed or developed.
    https://wiki.php.net/rfc/preload

    Static members and static variables

    To avoid misunderstanding, it is clear stated that preloading doesn't change the behavior of static class members and static variables. Their values are not going to relive request boundary.

    它们的值不会重新返回请求边界。
    是不是可以意味着将数据存在静态成员上面,而每次请求可用。
    2 replies    2019-05-17 13:46:41 +08:00
    funnuy
        1
    funnuy  
       May 17, 2019   ❤️ 1
    > To avoid misunderstanding, it is clear stated that preloading doesn't change the behavior of static class members and static variables.

    不会改变静态成员和变量的语义。

    > Their values are not going to relive request boundary.

    它们还是活不过请求边界,就是每次请求都初始化。
    doyouhaobaby
        2
    doyouhaobaby  
    OP
       May 17, 2019
    @funnuy 想反了,要是留一个开关就好了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2684 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:13 · PVG 19:13 · LAX 04:13 · JFK 07:13
    ♥ Do have faith in what you're doing.