Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93781 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5169 invoked from network); 4 Jun 2016 20:23:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2016 20:23:34 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:35038] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/2B-25194-5C833575 for ; Sat, 04 Jun 2016 16:23:33 -0400 Received: by mail-oi0-f51.google.com with SMTP id w184so174830334oiw.2 for ; Sat, 04 Jun 2016 13:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=eFCWjiHpOoOegpoLZ5HdHYut7zUjkreIOjxdc2jTZQ8=; b=c+bDAjm5IYuYIkP5QWQUzQc/vLfH2yguf7z9UXdXZmdRMjF/UuvORtIq9Hy/FQDhFz Sx/O219HidE/OWteN83tlHt3txJmw12DGFvboPGBYqF4mX13B3sut09Vatdz8ZRd90NX z0yyjoHfNXtX2vjZSAvRRq61Xo1viivpBoLe8RgFsPgKFQtlmo5aAIUgn3DeWqNIzHWy cX34BTxHeszh05ARo+lQVlvOBHW3+NMpSKlb43iMWcIiYN5324KSjVg2GrhdEITchvF+ 1rIWwOK9xObtKvjX/iBKLwHJG7u4oaeOvKIuLbNOkZKMPzwriAZfdUW71A0gN3z4wrRs DjFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=eFCWjiHpOoOegpoLZ5HdHYut7zUjkreIOjxdc2jTZQ8=; b=hADC5D4b15Xv9A8D+NKFuQpSTdpGrYGOkyLj82kq2u15XaxZF7M76qGaKwwUewx40j muwU+LQJls9e5qCI1Axk1VHuvm2iewqFPZslWvMN9QeBXGDo1CKpF/G9O7h8bUQJxF2u bcuP1kNVsXQEcMb0cNetIzwUygPch41Eh/F3PwfnMAzIcReSPExZFNrjTp7vDoACYZJG gC8IPpm+zd4QSWV7fEJmyzxC8gPn0q43iX7hqGJd1hVYx41VeZOgQEeUut9ZG8t1wqKv BGeFk+SzM4sUMHFFUMFUVE0IyIIhAfdBJQ1bftUdHnWpg37s7CE1wlNtgvJs9qzCD35P mlAQ== X-Gm-Message-State: ALyK8tKZ9NnX0weOFmAr1yjH8llIUuruI3EesVvKddl47DHZ9FM6bwjEjiVCs5Q+9M0LnA== X-Received: by 10.202.82.129 with SMTP id g123mr5293512oib.36.1465071811037; Sat, 04 Jun 2016 13:23:31 -0700 (PDT) Received: from stas-air.attlocal.net (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id z126sm6489695oig.10.2016.06.04.13.23.29 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Jun 2016 13:23:30 -0700 (PDT) To: Rasmus Schultz , PHP internals References: Message-ID: <801c8df4-4f33-935b-5bee-ff73a0865433@gmail.com> Date: Sat, 4 Jun 2016 13:23:31 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] can't reflection on DateTime properties? From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > The object clearly has properties corresponding to it's internal state, but > reflection doesn't seem to report them? Reflection reports defined properties, but classes can have dynamic properties that are not pre-defined. var_dump also has a separate handler, so the object can present different information to var_dump. > Also, what comes out of var_dump() appears to be something intended for > human consumption? I'm guessing that's not the actual internal state of the > object - most likely the internal state consists of the "timezone_type" and > an integer timestamp? In generic case, you can't have internal state of an object, that's why it's internal. If you need to serialize data, there are serialize/unserialize handlers for it. -- Stas Malyshev smalyshev@gmail.com