V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
such
V2EX  ›  PHP

PHP 魔术方法前加 引用符号

  •  
  •   such · Sep 26, 2018 · 2803 views
    This topic created in 2778 days ago, the information mentioned may be changed or developed.

    看 Laravel 源码,参考了一下它的 View 组件,发现这个写法 &__get,求问是什么意思呢

        /**
         * Get a piece of data from the view.
         *
         * @param  string  $key
         * @return mixed
         */
        public function &__get($key)
        {
            return $this->data[$key];
        }
    
    2 replies    2018-10-08 10:19:04 +08:00
    such
        2
    such  
    OP
       Oct 8, 2018
    @fcten 多谢解惑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2899 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:16 · PVG 15:16 · LAX 00:16 · JFK 03:16
    ♥ Do have faith in what you're doing.