Underscore method prefix

后端 未结 7 2155
挽巷
挽巷 2021-01-06 00:12

I\'ve been examining the code of CodeIgniter and CakePHP and I noticed that some of the methods in their classes are prefixed with an underscore _ or a double u

7条回答
  •  佛祖请我去吃肉
    2021-01-06 00:29

    The methods that start with __ are magic methods which get called automatically in php. for more reference , check,

    http://php.net/manual/en/language.oop5.magic.php

提交回复
热议问题