Re: json_encode ignores protected/private class members

From: Date: Thu, 09 Oct 2008 13:26:02 +0000
Subject: Re: json_encode ignores protected/private class members
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-40889@lists.php.net to get a copy of this message
>> Ok, nice solution, but I still don't see why json_encode ignores >> protected/private class members. I mean, why we need this feature. > > Because, in theory, it shouldn't even be able to see those members? > Stefan's right. Unless you are in the local scope or inheriting the object you shouldn't be able to see those variables. And I have yet to see classs Name extends json_decode($jsonValues) { } That's the point in having access modifiers. Unless I'm mistaking there's no bug there. -- Slan, David

« previous php.internals (#40889) next »