Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59981 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96486 invoked from network); 16 Apr 2012 01:31:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 01:31:33 -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:55150] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/F3-05733-4767B8F4 for ; Sun, 15 Apr 2012 21:31:33 -0400 Received: by obbta17 with SMTP id ta17so6026884obb.29 for ; Sun, 15 Apr 2012 18: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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=jVKzkPJA4kKdX7L2+Wd9xZU8f1sp/ReVefxEDVlWBIw=; b=eR1vC+o0NSyX0eL3DbCQy8wn263HneEkaret6UKBezZXtUL0jlsELorX3nxMGSCgtW 3GP3VtKXEUCe5X9hx7aYzNkmnqqTPkC28s9v7GOcvaEv7jnEEKi5/oe8UNFpwp1UGNol JTxqHK/ChgSa6CoPia4WMI3soX95QTjxpPAirp5yZ3DjGtCESNN0duGVYzJasdQDjB5v l6VRyCmqz1/U4WT4LmWGeWMxRHWcqKixgUG1pta63n0FIzDkzYUp/vzI/FNHoM/WnXy5 i9nkJ6ubX1JDm+aiz02vDX3FCNY5aUscZWzYm38r2y5DqGKnrUXE6I5g5VEDcANpRs/g eIZg== Received: by 10.182.131.7 with SMTP id oi7mr13599901obb.74.1334539890066; Sun, 15 Apr 2012 18:31:30 -0700 (PDT) Received: from ralph-macbook.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPS id o9sm17866655obd.21.2012.04.15.18.31.28 (version=SSLv3 cipher=OTHER); Sun, 15 Apr 2012 18:31:29 -0700 (PDT) Message-ID: <4F8B766F.3000702@ralphschindler.com> Date: Sun, 15 Apr 2012 20:31:27 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: Simon Schick CC: internals References: <4F89D4F1.8070009@ralphschindler.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmCxyxS3E4i7LS8zHnAu1eJWNd6NrwlFztA7Snwk+0g8X7MBv+yPRPjY54aikobNdfdJbXz Subject: Re: [PHP-DEV] New Feature: Fully qualified class name resolution as scalar with class keyword From: ralph@ralphschindler.com (Ralph Schindler) > One thing I personally dislike in this implementation is the > difference between CLASS and class ... One with and one without > namespaces ... I am not quite following. There is no functional difference between "class", "CLASS", or "Class". The parser is case insensitive with regards to keywords, which "class" or T_CLASS is on of. The code snipped I showed there was from the .phpt test that I had included in the Zend/test code base to ensure it worked and did not break existing tests. As per the namespaced and non-namespaced blocks, I was demonstrating how ::class would resolve names regardless of if it were a FQCN or a short class name. Effectively, you can put ::class behind any "type" name and it should work as demonstrated. -ralph