PHP – Indirect modification of overloaded property

All you need to do is add “&” in front of your __get function to pass it as reference:

public function &__get ( $index )

Struggled with this one for a while.

Leave a Comment