Ahh, I see, php7 adds a * for protected variables. Okey that explains it. I must admit, I did not work on the php7 compatibility, yet. Others work on it.
Does it work with if (!isset($item->$k) and '_' != substr($k, 0, 1) and '*_' != substr($k, 0, 1)) {
but without the trim?
I wonder if we should use a Constant to define if we search for _ or *, because the * sounds to be the future. The _ is just a convention, or?