The magic method __set() must have public visibility and cannot be static in

魔术方法 __set 用private 封装后出现问题 private function __set(){} 就是这个格式 10

错误信息就是这个:The magic method __set() must have public visibility and cannot be static
 

最佳答案
 
__set 必须是public访问权限. 并且不能定义成 静态方法. 
把 private 改成 public 即可.
原文地址:https://www.cnblogs.com/apolloren/p/7826968.html