On 01.03.2010 10:31, Tjerk Meesters wrote: > If visibility is an issue why not just use json_enode/decode for this > case then?it doesn't seem like a typical enough problem to be solved > low-level and json seems fast enough for the job ;-)
Honestly I personally don't care, it won't happen to me again, I know it now, but I want it to be fixed for the benefit of others. Sure it's a rare case, but if you're gonna pretend it's ok that objects have ghost properties set to them that are unreadable, I guess there is no point in discussing this further. Should I btw remind you that the following results in a Fatal error: Cannot redeclare Test::$foo ? class Test { protected $foo; public $foo; } So it's illegal, but let's do it anyway because in php core it's funny to do weird stuff that doesn't make any sense? And in any case json_encode doesn't work the same at all since it doesn't encode protected properties, and doesn't store the object type, so it'd be much more work. Cheers, Jordi
signature.asc
Description: OpenPGP digital signature