Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40889 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51344 invoked from network); 9 Oct 2008 13:26:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2008 13:26:09 -0000 Authentication-Results: pb1.pair.com header.from=david.coallier@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=david.coallier@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.171 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: david.coallier@gmail.com X-Host-Fingerprint: 209.85.200.171 wf-out-1314.google.com Received: from [209.85.200.171] ([209.85.200.171:25626] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7C/C5-48736-0760EE84 for ; Thu, 09 Oct 2008 09:26:08 -0400 Received: by wf-out-1314.google.com with SMTP id 26so39347wfd.26 for ; Thu, 09 Oct 2008 06:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=wPLe3Qv1e4PTxMSwME3qhuf8SQP+OCbeCjJ0KgyAyrU=; b=TWLaKAGKAnXSeV6qMmc1c2A26b64M0uyYtOxuuhJZNgtPjs1/hV0V8ZKwT4zhsbGSE 77zOpIA4H82TzChUVmrCZC7eAJacrUZIsc+2VBr3zSVwfUKTtQ5ksC7GjnlVgy1SCluQ wKR1S3/YSl+XjlWDlnBLjSHRspY8C+XspKSu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=YSkjInd08dDSNrTIhy00b9lUxZi1fOE+krbFgHpK0rIvTjFhE3olViYlPKvoJ2dwqV fxUNATE+jeIlJ04Tw8BsrY1fUnpZR0h4FCKbYbaLhp76tZKR/Ke3pJF8nBCcj+Lm7+uS UBiZrXrC41kPdi4BGSFvytD9Qx0210cjMcLS0= Received: by 10.114.60.19 with SMTP id i19mr129287waa.30.1223558762544; Thu, 09 Oct 2008 06:26:02 -0700 (PDT) Received: by 10.115.22.7 with HTTP; Thu, 9 Oct 2008 06:26:02 -0700 (PDT) Message-ID: Date: Thu, 9 Oct 2008 14:26:02 +0100 Sender: david.coallier@gmail.com To: "Stefan Walk" Cc: internals@lists.php.net In-Reply-To: <200810091517.37703.et@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48EDFEED.8080605@adplabs.com.br> <261daaa10810090607h1876200ex1efa43a40cfb24c2@mail.gmail.com> <48EE0387.3040802@adplabs.com.br> <200810091517.37703.et@php.net> X-Google-Sender-Auth: b944ebc6664317cf Subject: Re: [PHP-DEV] json_encode ignores protected/private class members From: davidc@php.net ("David Coallier") >> 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