Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91452 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49491 invoked from network); 28 Feb 2016 13:02:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2016 13:02:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=colder@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:36130] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/1F-55238-FDFE2D65 for ; Sun, 28 Feb 2016 08:02:24 -0500 Received: by mail-wm0-f54.google.com with SMTP id n186so14604384wmn.1 for ; Sun, 28 Feb 2016 05:02:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=MIzjAnvTzkCKiWONx/HlGkqnFFbLeK+Qfvormj+LBfo=; b=AWuJ+nG4bzpLaqExTJ1fOQdU9KqAwOeVvH0Wd4wtZM5LL9VrrSgcpzYK2aVe3EbGMh aNU2X7B3CIt0ieakLCJKHjnMmECoEulbtKR4f/3sdrlhEUWe51dX2Do8CXJOEnWkqxC/ HKwlPUlhiXBgCq43rfWyeVkrdTtY/nFIeHt+NLVf6JVARY/17SZC5uUb5AhPZr8Q99TT iFNkuNTEQZVUS/fDYzbR1TWPlCVJHjero67Qc8DeBKaZFT0zMNFbC4kAzPEnpVYEEhkl kkmAOX25KjRw4UlrRvx+KSpFPRtrkzuxRFZCCZxmbTTnkjEorGNPXNEFxRPae+3OK3bA BKmg== X-Gm-Message-State: AD7BkJIr4M7jkhvZTW5hyDpQplQpmUaP46+WWVshIpLWmrTnORpa89Yd8MNQAF0UmcxeeiPSt0hevApwRfgoqA== X-Received: by 10.28.171.8 with SMTP id u8mr6408723wme.97.1456664540508; Sun, 28 Feb 2016 05:02:20 -0800 (PST) MIME-Version: 1.0 References: <56d09560.1d0b620a.35fd7.fffff89c@mx.google.com> In-Reply-To: <56d09560.1d0b620a.35fd7.fffff89c@mx.google.com> Date: Sun, 28 Feb 2016 13:02:10 +0000 Message-ID: To: kelerest123@gmail.com, "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11450b047e7a08052cd42483 Subject: Re: [PHP-DEV] Static class property can be accessed as $object::$property? From: colder@php.net (Etienne Kneuss) --001a11450b047e7a08052cd42483 Content-Type: text/plain; charset=UTF-8 On Fri, Feb 26, 2016 at 7:12 PM wrote: > Hi, > > > I'd be very thankful for a clear explanation on this: > http://stackoverflow.com/questions/35656898 > > > May be it's just a word game and I don't understand it correctly, but > documentation states one, though $object::$staticProperty works in all > versions (tested on 3v4l). > $obj::$foo is a shortcut for $cl = get_class($obj); $cl::$foo; The static property is stored at the level of the class. What the documentation means is that you cannot access a static property using $obj->foo; you have to use "::" . Best, --001a11450b047e7a08052cd42483--