Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66682 invoked from network); 17 Apr 2012 19:31:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2012 19:31:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.214.170 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:64062] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/E2-03996-615CD8F4 for ; Tue, 17 Apr 2012 15:31:35 -0400 Received: by obbup16 with SMTP id up16so2050115obb.29 for ; Tue, 17 Apr 2012 12:31:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=JEPJF/6fRv7uw0H/ndZ87QJbOQn+hYl3nSCjo/dg/xc=; b=f6N8/cUIVgoPfWCG88nbGhYhUEFvNS23uUDWhV2XE3MdhDXNPOWPrRcFSdvEnUGDiT MlEp5U99JWGsr8axprkUFdzjKAlRhuUoAnAD2WMjGh86lsAw3IU9EZez6RgyWL/RQqUA D4LEA+53MKagx8aD36DjUp30j/i9lZUvanxxZp8V5+CXc7FpPyndIks6Ffmv6UvhdMko PXn6PEAxtPRN9ChWgGyMRvP2+4KU0y7irtlEpt8dyF5DfXmVT9n2jZMzjrIjk7lvFwRh VRSSwdeW9JPv8pM+j4di8JxSmn/bfCE+UHeMXfSNNKgGT2Ss+TUlDOhRQf83l7SWzQi+ iyjw== Received: by 10.182.183.73 with SMTP id ek9mr23370381obc.15.1334691090593; Tue, 17 Apr 2012 12:31:30 -0700 (PDT) Received: from ralph-mac.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPS id xb7sm24132995obb.10.2012.04.17.12.31.29 (version=SSLv3 cipher=OTHER); Tue, 17 Apr 2012 12:31:30 -0700 (PDT) Message-ID: <4F8DC511.6070803@ralphschindler.com> Date: Tue, 17 Apr 2012 14:31:29 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F89D4F1.8070009@ralphschindler.com> <4F8CEB3B.4080702@ralphschindler.com> <4F8DA14F.1030204@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQltZNcPJaGIEMCqy61/o4ThItqk0fT/7gxmKVWLdHU+Dd47FqfRprVj0KTDlgqq8bnxvJ3x Subject: Re: [PHP-DEV] Re: New Feature: Fully qualified class name resolution as scalar with class keyword From: ralph@ralphschindler.com (Ralph Schindler) > How would static::class behave ? is it handled by the current patch? > Maybe the test case could be extended to reflect this, and also for > self::class? Fantastic question. I am unsure how to handle this. Currently, it will simply resolve those names against the rules (I am sure this is the wrong behavior.) So, namespace Foo\Bar { var_dump(self::class); } Would now produce: string(12) "Foo\Bar\self" This is the same with 'self', 'static', and 'parent'. I guess the question is, should that produce a compile error, or conditionally work depending on if you are inside of a class declaration or not? I will add this consideration to the RFC. -ralph