__get/__set/__call performance questions with PHP

后端 未结 4 842
时光取名叫无心
时光取名叫无心 2020-12-06 19:23

I have a custom-built MVC PHP framework that I am in the process of rewriting and had a question about performance and magic methods. With the model portion of the framewor

4条回答
  •  生来不讨喜
    2020-12-06 20:06

    I have just asked myself this same question and came to the same conclusion: It's better to set the properties in the traditional way. __get() + massive switch slows everything down

提交回复
热议问题