such
V2EX  ›  PHP

PHP 魔术方法前加 引用符号

  •  
  •   such · Sep 26, 2018 · 2905 views
    This topic created in 2831 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   ·   965 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 19:00 · PVG 03:00 · LAX 12:00 · JFK 15:00
    ♥ Do have faith in what you're doing.