PHP - Indirect modification of overloaded property

前端 未结 8 1678
悲哀的现实
悲哀的现实 2020-11-28 08:38

I know this question has been asked several times, but none of them have a real answer for a workaround. Maybe there\'s one for my specific case.

I\'m building a map

8条回答
  •  迷失自我
    2020-11-28 09:07

    I was receiving this notice for doing this:

    $var = reset($myClass->my_magic_property);
    

    This fixed it:

    $tmp = $myClass->my_magic_property;
    $var = reset($tmp);
    

提交回复
热议问题